D
d9pierce
Hi all,
I have an unbound form called StartUp. this form only has cmdButtons
on it to open forms.
I need to create Cmd buttons to open a certain form and filter it to
meet criteria. An example of this is:
Private Sub CmdRetailClients_Click()
On Error GoTo Err_CmdRetailClients_Click
Dim stDocName As String
Dim LinkCriteria As String
stDocName = "Company_Main"
DoCmd.OpenForm stDocName, , , stLincCriteria
Exit_CmdRetailClients_Click:
Exit Sub
Err_CmdRetailClients_Click:
MsgBox Err.Description
Resume Exit_CmdRetailClients_Click
End Sub
this works fine to open the form but I need to add a filter or
something to fill a CboBox "CompanyType" with Criteria like
"Subcontractor" & "Retail Client".. which is text in this Cbo. I need
to create a different CmdButton for each record in this CboBox. I have
tried many variations but cant get it. any ideas would help.
Thanks so much,
dave
I have an unbound form called StartUp. this form only has cmdButtons
on it to open forms.
I need to create Cmd buttons to open a certain form and filter it to
meet criteria. An example of this is:
Private Sub CmdRetailClients_Click()
On Error GoTo Err_CmdRetailClients_Click
Dim stDocName As String
Dim LinkCriteria As String
stDocName = "Company_Main"
DoCmd.OpenForm stDocName, , , stLincCriteria
Exit_CmdRetailClients_Click:
Exit Sub
Err_CmdRetailClients_Click:
MsgBox Err.Description
Resume Exit_CmdRetailClients_Click
End Sub
this works fine to open the form but I need to add a filter or
something to fill a CboBox "CompanyType" with Criteria like
"Subcontractor" & "Retail Client".. which is text in this Cbo. I need
to create a different CmdButton for each record in this CboBox. I have
tried many variations but cant get it. any ideas would help.
Thanks so much,
dave