Column(1) in query

Zigzag

Registered User.
Local time
Today, 13:19
Joined
Aug 19, 2007
Messages
386
Hi all,

From another post that I have been trying to help with I have a question.

Is it possible to create a querie that has, in a criteria

Like Forms![Form1]![Lookup].Column(1)

Lookup is a combo box with 2 columns

It throw up an error message "Undefined function........."

Any help would be appreciated.

Garry
 
Forms![Form1].[Lookup].Column(1)

not sure if u need the ! or not...
 
Hi Ray,

Thanx for the fast reply but still the same error message.

Garry
 
Just to add by the way,

I can use
=Forms![Form1]![Lookup].Column(1)
as a control source in a text box without error.

Garry
 
why are u using a like for the criteria? also with a like youll need a * either before or after the entry

"*" & Forms![Form1]![Lookup].Column(1) & "*"

try something like that
 
OK forget the like,

Oringinaly I was using it with "*"& etc etc but took them out when I got the error, I just forgot to remove the LIKE

From posts I have managed to find so far I dont think I can use a combo column in a query.

Garry
 
use a dlookup to do it.. might be easier for ya
 
Good thinking........

Will give it a try.

Garry
 
I have the answer for you on how to do it though with a combo box.

1. Put a hidden text box on your form.

2. For the control source of the text box put =[YourComboBoxName].Column(1)

3. In the query's criteria use [Forms]![YourFormName]![YourTextBoxName]

And that should do it. I got the answer here:
http://support.microsoft.com/kb/93138
 
boB knows all.

i was hoping someone would bail me out:D:D:confused::confused:
 
Hi Bob,

Thanx for that, I have already used that as a workaround but it starts to get a little messy if I have to have a combo box and then a text box to translate an option group just to use it in a query.

Thanx guys,
I appreciate your help

Garry
 

Users who are viewing this thread

Back
Top Bottom