Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quotes and SQL

Status
Not open for further replies.

cranebill

IS-IT--Management
Jan 4, 2002
1,113
US
I have the following SQL statement:

Me!Config.RowSource = &quot;Select Distinct HConfig From Hoist Where TIncl <> -1 And HType = &quot;&quot;&quot; & Me!HoistType & &quot;&quot;&quot;&quot;

This works however I need to add more criteria that are text strings and for the life of me these quotation marks are going to drive me bonkers.

This is what I have:

Me!Capacity.RowSource = &quot;Select Distinct Cap From Hoist Where TIncl <> -1 And HType = &quot;&quot;&quot; & Me!HoistType & &quot;&quot;&quot; And HConfig = &quot;&quot;&quot; & Me!Config & &quot;&quot;&quot;&quot;

This doesnt work... what are the rules on this for i have more than just this one to add...

Bill
 
Try using the 'tick' instead of double quotes.

Code:
Me!Capacity.RowSource = &quot;Select Distinct Cap &quot; _
                      & &quot;  From Hoist &quot; _
                      & &quot; Where TIncl <> -1 &quot; _
                      & &quot;   And HType = '&quot; & Me!HoistType & &quot;' &quot; _
                      & &quot;   And HConfig = '&quot; & Me!Config & &quot;'&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top