L
lmcc007
I have a command button that when clicked it will open a form called Check
Addresses. Below is the code:
Private Sub cmdEditAddress_Click()
Me.Requery
DoCmd.OpenForm "frmCheckAddresses", , , "CompanyID=" &
CompanyID
End Sub
The above code works fine when there is an address (or one of the address
fields is filled out), but when there is no address I get an error instead of
a blank Check Address form. The error message is:
Run-time error ‘3075’:
Syntax error (missing operator) in query expression ‘CompanyID=’.
I want a blank form so I can add an address if the address field is blank.
How shall I do that? Any help will be appreciated.
Thanks!
Addresses. Below is the code:
Private Sub cmdEditAddress_Click()
Me.Requery
DoCmd.OpenForm "frmCheckAddresses", , , "CompanyID=" &
CompanyID
End Sub
The above code works fine when there is an address (or one of the address
fields is filled out), but when there is no address I get an error instead of
a blank Check Address form. The error message is:
Run-time error ‘3075’:
Syntax error (missing operator) in query expression ‘CompanyID=’.
I want a blank form so I can add an address if the address field is blank.
How shall I do that? Any help will be appreciated.
Thanks!