retrieve records based on combobox

baitmaster

New member
Local time
Today, 11:00
Joined
Jun 25, 2013
Messages
1
Good morning all, I'm new to Access (but experienced in Excel and VBA) and struggling a bit to do something that I think should be quite simple.

I have two Tables, "staff data" (staffID, name) and "issues log" (IssueID, StaffID, 20+ fields about individual Issues). StaffIDs are linked together so each employee can have multiple issues

I have (so far) Form1 containing individual Issues that can be filled in, or retrieved one at a time / scrolled through in IssueID order

What I want is a second form, containing a combobox with all StaffIDs (+ names) listed; when a StaffID is selected, a table is loaded containing all Issues for that employee. When any of these is selected, Form1 is loaded

I have created the second form, including the combo that contains both StaffIDs and Names. I can't yet grasp how to show the set of Issues applicable to that employee when I change that combo

Alternatively, If I could have the combo on Form1, so that just records applicable to that employee can then be scrolled through, that would be ideal too

Thanks for any advice

# cross posted on mrexcel.com microsoft access forum, I can't include the link because I'm a noob here ##
 
In the After Update event for the combobox you could filter the form, for example,

Code:
Me.Filter = "[StaffID]=" & Me.ComboBox1
Me.FilterOn = True
 
And make sure that the combo box is UNBOUND.
 

Users who are viewing this thread

Back
Top Bottom