G
Guest
I have a public function in a form: Public Function DeleteNewRecord()
I'm trying to call that function from another form and I keep getting the
error message: "There is an invalid use of ! or .(dot) or invalid parenthesis.
Private Sub CancelNewRecord_Click()
DoCmd.Close
DoCmd.OpenForm "NewPartInputfrm", , , , acFormEdit
DoCmd.GoToRecord , , acLast
Forms![NewPartInputfrm]![Model#] = "test"
Call Forms.NewPartInputfrm.DeleteNewRecord
End Sub
Am I calling this wrong? I don't want to put the DeleteNewRecord() in a
module because I'm using a lot of Me.field name and I don't want to include
the form name to the code because it's quite long. Thank you.
I'm trying to call that function from another form and I keep getting the
error message: "There is an invalid use of ! or .(dot) or invalid parenthesis.
Private Sub CancelNewRecord_Click()
DoCmd.Close
DoCmd.OpenForm "NewPartInputfrm", , , , acFormEdit
DoCmd.GoToRecord , , acLast
Forms![NewPartInputfrm]![Model#] = "test"
Call Forms.NewPartInputfrm.DeleteNewRecord
End Sub
Am I calling this wrong? I don't want to put the DeleteNewRecord() in a
module because I'm using a lot of Me.field name and I don't want to include
the form name to the code because it's quite long. Thank you.