Hi i have two forms (Invoices)A and B invoice A opens as default would love to open invoice B with certain criteria so i put command below into the on open of in voice A
but still opens first at invoice A then when i click close it then opens invoice B any suggestions Cheers
Private Sub Form_Open(Cancel As Integer)
DoCmd.Maximize
If BPS_J_Q = "bpmq" Then
stDocName = "WM Invoice"
stLinkCriteria = "[Job No]=" & "'" & Me![Job No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
If BPS_J_Q = "bpsj" Then
stDocName = "WM Invoice"
stLinkCriteria = "[Job No]=" & "'" & Me![Job No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End If
End Sub
but still opens first at invoice A then when i click close it then opens invoice B any suggestions Cheers
Private Sub Form_Open(Cancel As Integer)
DoCmd.Maximize
If BPS_J_Q = "bpmq" Then
stDocName = "WM Invoice"
stLinkCriteria = "[Job No]=" & "'" & Me![Job No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
If BPS_J_Q = "bpsj" Then
stDocName = "WM Invoice"
stLinkCriteria = "[Job No]=" & "'" & Me![Job No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End If
End Sub