Query Code in VBA - Newbie

ezykiwi

Registered User.
Local time
Tomorrow, 03:20
Joined
Sep 5, 2006
Messages
33
In the code of a button, ive got....

Which should be pulling the value in cb1 in the last cat query, but im getting an error saying it cant find the field "|" refered too...

Basically there is a table called Last Cat, and I want to draw the value of cb1 out of it where the catpathid = 5 so i made the query to do that... but now im abit lost....

Me.combo1.Value = [Last Cat Query1]![cb1]

any help would be awesome.
 
How about this:

PHP:
strSQL = "SELECT cb1 FROM Last Cat WHERE catpathid = 5"
Me.combo1.rowsource =  strSQL

You may need to place Last Cat in quotes since there is a space in the table name.

Ken
 

Users who are viewing this thread

Back
Top Bottom