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

tihmir

Registered User.
Local time
Yesterday, 22:40
Joined
May 1, 2018
Messages
216
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, 06:40
Joined
May 23, 2011
Messages
4,442
Here's one way to consider.
 

Attachments

  • Rqd01.zip
    35.2 KB · Views: 163

tihmir

Registered User.
Local time
Yesterday, 22:40
Joined
May 1, 2018
Messages
216
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, 06:40
Joined
May 23, 2011
Messages
4,442
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: 139

tihmir

Registered User.
Local time
Yesterday, 22:40
Joined
May 1, 2018
Messages
216
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: 139

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:40
Joined
May 7, 2009
Messages
16,393
see if this is the intent.
 

Attachments

  • Rqd04.zip
    29.6 KB · Views: 114

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:40
Joined
May 7, 2009
Messages
16,393

Users who are viewing this thread

Top Bottom