A
Alex H
Hi I am using a button on a subform, to open a new form and add a new
record. When I use this code and there is already a record on the subform,
it works. if it is the first record oin the subform I am getting an error
message:
An expression you entered is the wrong data type for one of the arguements.
Can someone help me - thanks
code is:
On Error GoTo btnAddStudent_Click_error
DoCmd.OpenForm "frmContacts", acNormal, , , acFormAdd, acWindowNormal,
Me![OrganisationID]
btnAddStudent_Click_Exit:
Exit Sub
btnAddStudent_Click_error:
Select Case Err
Case Else
MsgBox Err & " - " & Error$, vbCritical + vbOKOnly, "Error in
btnAddStudent_Click"
Resume btnAddStudent_Click_Exit
End Select
Alex
record. When I use this code and there is already a record on the subform,
it works. if it is the first record oin the subform I am getting an error
message:
An expression you entered is the wrong data type for one of the arguements.
Can someone help me - thanks
code is:
On Error GoTo btnAddStudent_Click_error
DoCmd.OpenForm "frmContacts", acNormal, , , acFormAdd, acWindowNormal,
Me![OrganisationID]
btnAddStudent_Click_Exit:
Exit Sub
btnAddStudent_Click_error:
Select Case Err
Case Else
MsgBox Err & " - " & Error$, vbCritical + vbOKOnly, "Error in
btnAddStudent_Click"
Resume btnAddStudent_Click_Exit
End Select
Alex