Message Box for Subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am needing a message box to appear based on a null date field on a subform.

Main Form: f*GeneralInformationWITHQUOTE
AutoNumberField that opens main form: JobNumber
Subform: fJobStatus
Date Field on subform: RevisedPOReceived

What I would like to happen is when I enter a job number and my main form
opens if there is not a date in RevisedPOReceived, a message box will appear
"Revised PO Needed".

I have tried a macro and even writing code (which I know very little about)
and can't get anything to work. I either get "Can't find form" or "Can't
parse expression", no matter how I write the form and field names.

Any help would be greatly appreciated.

Thanks,
PHisaw
 
-----Original Message-----
I am needing a message box to appear based on a null date field on a subform.

Main Form: f*GeneralInformationWITHQUOTE
AutoNumberField that opens main form: JobNumber
Subform: fJobStatus
Date Field on subform: RevisedPOReceived

Most likely your error is in the syntax of referring to a
subform control, which is, in general:

Forms!MainFormName!SubformName.Form!SubformControlName

In your case, this is:

Forms!f*GeneralInformationWITHQUOTE!fJobStatus.Form!
RevisedPOReceived

HTH
Kevin Sprinkel
 
I tried the reference you listed and tried on Before Update and On Load the
following:

If Not
IsNull(Forms!f*GeneralInformationWITHQUOTE!fJobStatus.Form!RevisedPOReceived
Then
MsgBox "Revised Purchase Order Not Received"
End If

and I got a type mismatch back and it (Forms!F * Gener...).

Please help!!

Thanks,
Phisaw
 
Back
Top