Hi everyone,
I have a combo box on my switchboard with a list of forms that can be opened. Once the user selects the form they need, I have a command button that opens the form. I've tried adding the if statement to my code, It doesn't seem to work:
Private Sub Command134_Click()
On Error GoTo Err_Command134_Click
Dim stDocName As String
Dim stLinkCriteria As String
If stDocName = "Account Receivable" Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
If stDocName = "GeneralLedger" Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
If stDocName = "Interface" Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
If stDocName = "Account Payable" Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
Help! What am I doing wrong???
I have a combo box on my switchboard with a list of forms that can be opened. Once the user selects the form they need, I have a command button that opens the form. I've tried adding the if statement to my code, It doesn't seem to work:
Private Sub Command134_Click()
On Error GoTo Err_Command134_Click
Dim stDocName As String
Dim stLinkCriteria As String
If stDocName = "Account Receivable" Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
If stDocName = "GeneralLedger" Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
If stDocName = "Interface" Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
If stDocName = "Account Payable" Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
Help! What am I doing wrong???