Autofill fields depending on another

mbhw99

Registered User.
Local time
Yesterday, 18:56
Joined
Apr 3, 2012
Messages
55
I realize this is posted quite often in this forum, but I haven't been able to find a solution to my particular problem.

I have 3 combo boxes filled with employee names and an employee ID #'s. They are populated by their own queries, and all the queries pull from tbl eidandname and have a similar structure but in different order:

Queries: "eid Query", "First Name Query", and "Last Name Query"
EID - number
First Name - text
Last Name - text

The EID is the only field guaranteed to not have a duplicate, as you can imagine...the only problem is that not everyone knows someone elses EID, just by name.

How can I autofill these by inputting from any of the combo boxes? I'm using Access '02.
 
You don't need 3 combo boxes. Put a combo box on the EID field.
Look at "DemoComboBoxA2000.mdb" (attachment, zip).
First column in combo is column 0.
 

Attachments

Search fields should be unbound. The RecordSource for the form can reference the search fields.

The form's recordsource is a different and unrelated table.

This method looks like what I'm looking for, if the form recordsource problem can be worked around.


You don't need 3 combo boxes. Put a combo box on the EID field.
Look at "DemoComboBoxA2000.mdb" (attachment, zip).
First column in combo is column 0.

Thank you for your help! I did take a look at your db. I might use this for another db that I manage.
 
My form's recordsource is from "tbl occurance input". tbl eidandname is only for the 3 fields outlined in the pic.
 

Attachments

  • form1.jpg
    form1.jpg
    82 KB · Views: 132
Very good. Once again a simple solution has escaped me. lol

One more (noob) question. The whole form is saved as 1 record (and as I look in my previous posts, I notice that I did not mention that. My apologies). Since these 3 fields are unbound, will they still be saved with the rest of the data?
 
Thanks for clearing that up. I'm having problems with my code, though. Could you please explain what is wrong?

Code:
SELECT Qry occurance input.EID, Qry occurance input.First Name, Qry occurance input.Last Name FROM Qry occurance input ORDER BY Qry occurance input.EID Where EIDS = Forms!frm occurance input!Search EID OR LNS = Forms!frm occurance input!Search Last Name OR FNS = Forms!frm occurance input!Search First Name;

EIDS, LNS, and FNS are the search fields I'm putting in the header...just renamed the field name.
 

Users who are viewing this thread

Back
Top Bottom