Button on form to open another form

Mike Hughes

Registered User.
Local time
Today, 17:06
Joined
Mar 23, 2002
Messages
493
I have a form with a sub form on it, call them Form 1 and Form 2.

At the bottom of the form there is a control button which opens Form 3.

Form 1 and Form 2 data is tied together using a field called Case ID so Form 1shows Case data while Form 2 shows member data.

Form 3 shows financial data for the Case and this is tied also by the Case ID on Form1.

If there is no financial data for a case Form 3 opens a blank screen, if there is financial data Form 3 opens showing that data.

I would like to have Form 3 not open at all if there is no financial data there to view.

I can't figure out how to do this and any help would be appreciated.

See attached screenshots
 

Attachments

  • FORM AND SUBFORM.JPG
    FORM AND SUBFORM.JPG
    56.2 KB · Views: 301
  • CURRENT DUE.jpg
    CURRENT DUE.jpg
    91.9 KB · Views: 285
  • NO CURRENT DUE.jpg
    NO CURRENT DUE.jpg
    41.5 KB · Views: 276
Try the Following in the On Load Event of Form3;

Code:
If Me.RecordSet.RecordCount = 0 Then
     Docmd.Close
     MsgBox "No Data for that record please make another selection"
EndIf
 
That worked great! Thanks
 

Users who are viewing this thread

Back
Top Bottom