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.
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.