In the footer of the customer contact form there is a button to enter a new contact and selecting it opens a separate form to input a new customer contact. When doing this I get the error "Runtime error 2498 Expression entered is the wrong data type for one of the arguments".
Below is the Click event to add a contact and the On Load event of the form it is supposed to load:
Expand|Select|Wrap|Line Numbers
- Private Sub btnAddContact_Click()
- DoCmd.OpenForm "frmAddCompanyContact", , , , acFormAdd, , Me!CompanyID
- End Sub
Expand|Select|Wrap|Line Numbers
- Private Sub Form_Load()
- If Not IsNull(Me.OpenArgs) And Me.NewRecord Then
- Me!CompanyID = Me.OpenArgs
- End If
- End Sub