Like criteria and combo box

emartel

Registered User.
Local time
Yesterday, 16:11
Joined
Jan 15, 2005
Messages
48
Trying (as previous thread) to get a combo box to appear when running a query, instead of a message box, to display returned data 'Like' data held in a table.

I did as Maxmangion suggested: [Forms]![c_RenewalDate]![RenewalEdition] is in my criteria row, referencing an unbound combo box in c_RenewalDate form.

However, I still get the message box appearing and it doesn't return the data I type in!

Sorry - I'm a bit of an amateur.

Thanks In advance
 
if you want data "like" then you need to say so in the query criteria

Code:
Like [Forms]![c_RenewalDate]![RenewalEdition] & "*"

Col
 
yeah, that bit I know: I can return the data I want, but if one of my users spells the parameter data wrong, then they wont understand why the query returns no data.
Therefore, the problem I have is that I want the combo box to appear (so as there is no chance that they can spell it wrong) not the default message box when I run the query.

thanks anyhow,
 
Oh I see - at the moment you get a parameter box :rolleyes:

well, you'll have to create a form with the ComboBox on it and have that act as the parameter box instead.

Col
 
Ive created the Unbound combo box and form (as in: [Forms]![c_RenewalDate]![RenewalEdition] ), but how do I get the query to recognise the form combo box as the replacement for the parameter box? that's the bit I didn't understand.

(I've tried editing the LookUp field properties in the query field to 'point' to the form and combo box, but that still didn't do it :eek: )

thanks
 
If you put in the criteria as Max suggested and provided that the form with the Combo is open, the query should run ok. If it throws up a parameter box then its trying to reference something that doesn't exist or is not open.

Check you have the exact spelling correct and check that the report isn't referencing the form after its closed.

Col
 
It's not working: I'm still confused!!
I want to replace the parameter box with my own combo box, so to do this I make a form with an unbound combo box on it. In the query Criteria row, I type [Forms]![thenameoftheform]![nameofcombobox]. I leave the form open and run the query. The query should return the results which match the combo box display.

That's what I did and it didn't work: no data was returned.

Sorry to be a pain...
 
Ooh - hang fire - I did it!
Many, many thanks for your help, greatly appreciated and invaluable for dabblers like me. :D
 

Users who are viewing this thread

Back
Top Bottom