G
Gina Whipp
Hi All,
Below is a piece of code that is suppose to trigger a pop-up menu but only
if there is a Chart of Accounts number. What is happening is the DLookUp
never triggers, instead I ALWAYS get the MsgBox "ugh!". Mind you that is
there for test purposes only. And yes the Payee field is a text field.
Oh, and while your at it perhaps explain why if the Payee has a apostraphe
in it I get an error, any way to trap that?
Thanks for any help you can give,
Gina Whipp
If DLookup("apPayee", "qryFindChartOfAccounts", "apPayee=" & "'" & cboPayee
& "'") <> Me.cboPayee Then
MsgBox "No Chart of Accounts number available for this Payee!",
vbInformation, "Checking Log"
DoCmd.CancelEvent
Else
MsgBox "ugh!" 'This ALWAYS triggers...
'If Not IsNull(Me.cboPayee) Then
'DoCmd.OpenForm "sfrFindChartOfAccounts", , , "apPayee=" & "'" &
cboPayee & "'"
'Else
'MsgBox "You MUST select a Payee first!", vbInformation,
"Checking Log"
'End If
End If
Below is a piece of code that is suppose to trigger a pop-up menu but only
if there is a Chart of Accounts number. What is happening is the DLookUp
never triggers, instead I ALWAYS get the MsgBox "ugh!". Mind you that is
there for test purposes only. And yes the Payee field is a text field.
Oh, and while your at it perhaps explain why if the Payee has a apostraphe
in it I get an error, any way to trap that?
Thanks for any help you can give,
Gina Whipp
If DLookup("apPayee", "qryFindChartOfAccounts", "apPayee=" & "'" & cboPayee
& "'") <> Me.cboPayee Then
MsgBox "No Chart of Accounts number available for this Payee!",
vbInformation, "Checking Log"
DoCmd.CancelEvent
Else
MsgBox "ugh!" 'This ALWAYS triggers...
'If Not IsNull(Me.cboPayee) Then
'DoCmd.OpenForm "sfrFindChartOfAccounts", , , "apPayee=" & "'" &
cboPayee & "'"
'Else
'MsgBox "You MUST select a Payee first!", vbInformation,
"Checking Log"
'End If
End If