PDA

Click to See Complete Forum and Search --> : Using Variables In Where Queries


whittam
Jul 14th, 2000, 03:26 AM
I am trying to write an sql where query which will retrieve a group of records based upon a variable which was assigned earlier in the program.

The variable is global, but everytime I run the program I get missing parameters.

The following is the Sql I am using

"Select * From [OInspect] Where AgentID = AgentNo"
AgentId is a field in the table AgentNo is the Global variable
Has anyone got any suggestions????

Jimbob
Jul 14th, 2000, 03:41 AM
hows about this??

"Select * From [OInspect] Where AgentID = " & AgentNo

whittam
Jul 14th, 2000, 04:38 AM
Thanks alot Jimbob, that worked great.