If you have setup your Combobox correctly the name will be displayed vice the ID
Can you upload your db?
If you have setup your Combobox correctly the name will be displayed vice the ID
Can you upload your db?
You can PM me if you need further help.
Good Reading https://docs.microsoft.com/en-gb/off...on-description
@LeonS You have been told at least 3 times that you store the ID.
On your search form you simply repeat the combo so your end users see the Country / Industry TEXT value, but the combo presents the stored ID as the search criteria to the query.
This is 100% the correct way to do this.
Your master table should only have the Country ID or Industry ID stored as a foreign key, never the text as well.
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
Hello! Let me start by apologising to all that have tried to help me with the ComboBox. I am now trying to create a new ComboBox based on what has been told me. I now realise that the entry in the Master1 table should be the Industry number NOT the text. I will then try to run the query. I expect the "Please write the name of the Industry" message box to appear and for me to insert the Text (eg Media) in that box. And press OK. I then expect a table containing the name of the person in that Industry to appear in an Excel spreadsheet which shall be exported to my Desktop. Back soon. Leon
Hello, again. I have recreated a new ComboBox as per the Wizard. The Field Industry accepts the word "Law" and that word's ID number is saved in Master1. So far, so good. When I run the Query, if I enter Law, I get nothing. If I enter 15 (the ID for Law) I get those people in the Law. How do I change my Query/ ComboBox so inputting the Text will give the answer I want?
Hello, again. I have recreated a new ComboBox as per the Wizard. The Field Industry accepts the word "Law" and that word's ID number is saved in Master1. So far, so good. When I run the Query, if I enter Law, I get nothing. If I enter 15 (the ID for Law) I get those people in the Law. How do I change my Query/ ComboBox so inputting the Text will give the answer I want?
You should add the table tblIndustries to the query - Join On IndustryID - then add the Industry Field from tblIndustries. - then add the criteria [Enter Industry] in the Industry Column.
The Industry field should be deleted from Master1
You can PM me if you need further help.
Good Reading https://docs.microsoft.com/en-gb/off...on-description
That was explained in post 9. Putting it another way, in a query you join the lookup table ID (the autonumber Primary Key field) field to the Master1 Industry field (Foreign Key containing the PK values from lookup table). Enter "Law" in the lookup table field for industry, not the ID field. Your query then finds Law, which is equivalent to saying wherever 2 = 2 (or whatever Law autonumber is).
Or if there are already records, converted to numbers as text (the PK values from Industry lookup table) using an update query, then the field property changed to long.The Industry field should be deleted from Master1
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.