[AccessD] Combo to Combo

Susan Harkins ssharkins at bellsouth.net
Mon Oct 3 08:56:59 CDT 2005


I haven't been following the thread, but Virginia, I don't think you need
those inner quotations around the subquery. 

Susan H. 

Still getting the same error, Invalid SQL statement. It highlights the first
part of the statement.

 

"SELECT MechanismID, FailureMechanism FROM tbl_mechanism WHERE MechanismID

IN "

 

 

"SELECT MechanismID, FailureMechanism FROM tbl_mechanism WHERE MechanismID

IN " (SELECT MechanismID FROM tbl_IdentMechanism WHERE IdentID=" &

me.cboMechanism &")";

 

________________________________

Probably the line continuation character (" _ ")  ... Its only for code, not
a control property. Sorry, that's on me; as I got to the right edge of the
email, I put it in out of habit.  Make the  whole sql string string into one
line.
 
Hth
Steve
 
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
<http://databaseadvisors.com/mailman/listinfo/accessd>
[mailto:accessd-bounces at databaseadvisors.com
<http://databaseadvisors.com/mailman/listinfo/accessd> ] On Behalf Of
Hollis, Virginia
Sent: Monday, October 03, 2005 8:33 AM
To: accessd at databaseadvisors.com
<http://databaseadvisors.com/mailman/listinfo/accessd>
Subject: [AccessD] Combo to Combo
 
Thanks so much, I think that is what has me thrown off on this whole thing -
the repeated values in the tables. I could not figure out a way to make them
match without repeating everything.
 
Steve,
When I used the Select, I get an error - Invalid SQL statement, Delete,
Insert, Or Select... It highlights the first part of the statement, to the
IN.
 
What am I doing wrong?
 
tbl_Identification (Alarm, Battery, etc) IdentID (autonumber) Identification
(text)
 
tbl_Mechanism (Age, Wear, etc)
MechanismID (autonumber)
FailureMechanism (text)
 
tbl_IdentMechanism
IdentID (number)
MechanismID (number)(these are the primary key numbers from the
Identification & Mechanism tables)
 
The form has 2 combos, cboMechanism & cboIndentifcation
 
"SELECT MechanismID, FailureMechanism FROM tbl_mechanism WHERE MechanismID
IN " & _ " (SELECT MechanismID FROM tbl_IdentMechanism WHERE IdentID=" &
me.cboMechanism &")";
 
 
Virginia
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 9/30/2005
 




More information about the AccessD mailing list