Hopefully Simple Filtering Question

BWG3

Registered User.
Local time
Today, 06:41
Joined
Sep 22, 2009
Messages
44
I have a switchboard button that opens a form. On this form I have a button (Command 20) and a combo box (Combo 18). The combo box contains employee names from another table in which I can select one employee name at a time. I want the "command 20" button to open up another form (I'll call it "Update Form") while also filtering it by "employee" which is an input in "Update Form".

An example of this would be:

I select "Bob" on my "Combo 18" combo box. Then I click "command 20" button. I want "update form" open only displaying the forms associated with Bob.

The code of my command button is below. I just do not know what to set "stLinkCriteria" to. "person Responsible" is the employee name on "update form". I want to set this equal to the name selected in "combo 18".

Private Sub Command20_Click()
On Error GoTo Err_Command20_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Update_Form"

stLinkCriteria = "[Person Responsible]=
DoCmd.OpenForm stDocName, , , stLinkCriteria

Any suggestions? Thanks in advance.
 
Thanks for your help. I may not be doing it right but I can't seem to get it to work. I'm trying to filter based on names selected in a subform which is located on the main form "update form". Is this possible? Is there anything different I need to do?
 

Users who are viewing this thread

Back
Top Bottom