(apologies on the round-about to explaination for a probably very simple error..)
I have a short subroutine that is usually called like this: "CheckForApplicationNote (me)" - it runs fine
In one instance, from the form which is the usual one that I call the sub from (the "me" form), I open a modal pop-up form.
When that form closes, I want the sub to run on its close evet, so, I've added the code "CheckForApplicationNote (Forms![frmSpec])", where frmSpec is a valid form (it is acually the name of the usual form that the sub is called from) ---but a I get a datatype mismatch error
my sub is:
Public Sub CheckForApplicationNote(frm As Access.Form)
vStr = "[Manufacturer] = '" & frm.Manufacturer & "' AND [CatalogNumber] = '" & frm.CatalogNo & "'"
varX = DLookup("[ApplicationNotes]", "FixtureCataloges", vStr)
vLen = Len(Nz(varX))
If vLen > 0 Then
frm.lblHasApplicationNote.Caption = "*"
Else
frm.lblHasApplicationNote.Caption = ""
End If
End Sub
Any idea on how I ought to be calling the form would be greatly appreciated
THANX,
mark