A simple Q for you guys! (1 Viewer)

NewShoes

Registered User.
Local time
, 19:38
Joined
Aug 1, 2009
Messages
223
Hey all,

This is probably very simple but I cant seem to figure it out!...

I have 1 form (Employee Details which is based on one table of same name). On this form I have employee number, forename, surname, grade etc. The form works fine and I can search thru the records. However, all I want is to change Employee number to a combo box and have the other fields (forename etc) change with the selection in the combo box.

I can get the Employee Numbers in the combo box, bound to the employee ID autonumber etc. I just cant figure out how to get the related fields to change!!

Any help wud be great :)

-NS
 

NewShoes

Registered User.
Local time
, 19:38
Joined
Aug 1, 2009
Messages
223
Thanks for your reply. I've had a look and I dont really want to do anything as complicated as a search form. All I really need is to be able to select an Employee Number from a combo box and have the related employee details be displayed (not even in a subform or anything).

Thanks,
-NS
 

namliam

The Mailman - AWF VIP
Local time
Today, 04:38
Joined
Aug 11, 2003
Messages
11,695
If you dont need to edit that result you can do this usign the combobox to extract data
Me.YourTargetText1 = Me.Combobox(0)
Me.YourTargetText2 = Me.Combobox(1)
Me.YourTargetText3 = Me.Combobox(2)
 

jtkjames

Registered User.
Local time
, 19:38
Joined
Jul 12, 2010
Messages
46
Try putting parameters in the query that the form is based on, then adding an update function.

So for example make the field [Employee ID] have parameter [Forms]![frmName]![ComboName]

Then, on the Combobox's OnChange, put

Code:
 DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70

which tells the form to update / refresh.
 

Users who are viewing this thread

Top Bottom