Simple Query Question

iliast

Registered User.
Local time
Today, 19:41
Joined
May 21, 2007
Messages
26
Some of my criteria into the query I made, are combo boxes. But the result in the corresponding column is a number (the id). How I can see there text? (the names and not the id of the items). Thank you...
 
Include the table that your combo is based on in your query. Add the the text field to your query.
 
Include the table that your combo is based on in your query. Add the the text field to your query.

More specific pls...? (language doesn't help, I'm greek) :)
For example (actually I have the same field into my query): Search Combo Box "Day" with all days (Monday till Sunday-IDs from 1 to 7)) from table "Works" (the standalone table is "Days"). But the result column numbers are from 1 to 7. How I can take in these columns the names "Monday", "Tuesday", ech ? Thank you...
 
Let's say it looks like this:
Code:
Days
DayID  DayText
 1       Monday
 2       Tuesday
etc
Now in your query at present, you will have the field DayID from the table Works where you use the value from the combo box as a criterion. You need to have DayText, so you need to add table Days to your query and join it to Works on DayID and then add DayText to your query results grid.
 
Unbelievable! We will not manage to communicate (the fault is mine of course) :) I am sending you the database, with only the data we need (very simple, two tables, one column). Please note that there is visual basic code available when the form "Search" is in design mode. Is there something I must write there? Please be patient with me... I feel that this will be my last post to you (except my final thanks-message of course :) )
 

Attachments

Have a look at my version. It's a lot simpler than yours.

I have also removed the table level lookup. These cause all sorts of problems and you should avoid using them if you can,
 

Attachments

That was very nice!! The problem is that into this Search form, I have more combo boxes with criteria, and I need first to make my choices and then a button to push and start the searching. The columns in the results are more than one of course. Exactly where I can put your code into mine...? :)
 
Have a look at the Sample Databases section in these forums. You will find lots of different types of searches, including the type of thing you are wanting.
 

Users who are viewing this thread

Back
Top Bottom