Message Box for Subform

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
 
K

Kevin Sprinkel

-----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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top