I have the following problem:
On my subforms I assign the first name + last name (from the master form) to a text box in the form_current event of the subform. It works for the current record, however for a new record I get "runtime error 94' - invalid use of null"
The database that I am reading and writing from is currently empty except for the few test records.
this is the code that I have.
Private Sub Form_Current()
If Form_MasterForm.txtLastName.Value <> Null And Form_MasterForm.txtFirstName.Value <> Null Then
myString1 = Form_MasterForm.txtLastName
myString2 = Form_MasterForm.txtFirstName
Me.txtNameFromMaster = myString1 & ", " & myString2
End If
End Sub
Could anyone please help me.
thank you
On my subforms I assign the first name + last name (from the master form) to a text box in the form_current event of the subform. It works for the current record, however for a new record I get "runtime error 94' - invalid use of null"
The database that I am reading and writing from is currently empty except for the few test records.
this is the code that I have.
Private Sub Form_Current()
If Form_MasterForm.txtLastName.Value <> Null And Form_MasterForm.txtFirstName.Value <> Null Then
myString1 = Form_MasterForm.txtLastName
myString2 = Form_MasterForm.txtFirstName
Me.txtNameFromMaster = myString1 & ", " & myString2
End If
End Sub
Could anyone please help me.
thank you