Solved Subform required if main form has created new record (1 Viewer)

tihmir

Registered User.
Local time
Today, 09:31
Joined
May 1, 2018
Messages
257
Hi all, I need some help, pleas.
I have main form with name "frmMain" and linked subform with name"subfrmSubForm".
I need to make the subform "subfrmSubForm" and my filed "txtField" on subform required I . So if I have created new record on my main form "frmMain" I am obliged to fill in my txtField which is on the subform.
How to make this with VBA?
 

bob fitz

AWF VIP
Local time
Today, 16:31
Joined
May 23, 2011
Messages
4,717
Here's one way to consider.
 

Attachments

  • Rqd01.zip
    35.2 KB · Views: 190

tihmir

Registered User.
Local time
Today, 09:31
Joined
May 1, 2018
Messages
257
Here's one way to consider.
Thank you for the advice, bob fitz.
Another thing I need is a warning message if I try to leave the Main form without making a record in the subform textbox.
 

bob fitz

AWF VIP
Local time
Today, 16:31
Joined
May 23, 2011
Messages
4,717
Thank you for the advice, bob fitz.
Another thing I need is a warning message if I try to leave the Main form without making a record in the subform textbox.
If you need that, even for existing records, you might do that as I have in the attached db
 

Attachments

  • Rqd03.zip
    24.5 KB · Views: 167

tihmir

Registered User.
Local time
Today, 09:31
Joined
May 1, 2018
Messages
257
If you need that, even for existing records, you might do that as I have in the attached db
Тhank you again, bob!
I may not have explained correctly, but what I want is when a new entry is entered in my Main form then I must enter data in my Subform (in my text fields, that are on mine). If I do not enter data and do not create a new record in mine Subform, then I will receive a message "Please enter data in the Subform"
 

Attachments

  • Rqd04.zip
    49.3 KB · Views: 166

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:31
Joined
May 7, 2009
Messages
19,169
see if this is the intent.
 

Attachments

  • Rqd04.zip
    29.6 KB · Views: 140

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:31
Joined
May 7, 2009
Messages
19,169

Users who are viewing this thread

Top Bottom