Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Activation/non Activation of subform

Status
Not open for further replies.

Blondie96

Programmer
Aug 12, 2004
119
0
0
US
I have a main form, which provides information about requests for room usage. (office symbol, poc.. etc)

It has a subform which collects:

(start date/hr enddate/hr) 1-10 occurrences.

Problem:

while testing the form, if I hit escape with no data in any fields (or esc & clear fields from main w/o ever going into the subform) I get the error "Start date required"... 4 times before the mainform will close.

I want the subform to only "require" data after all the fields in the main form are completed (& record written to primary file). After tabbing thru the main form, I want to be able to "Tab Into" the subform, thereby requiring the field "on_exit" to be tested... (I hope this makes sense)

.i.e. the "Start Date" is the first field in the subform, the on_exit event produces the above mentioned error.

Can someone help me resolve this (somewhat) annoying problem.

Thanks,

Tamra
 
Hmmm,

I just went into the subform, now it is creating that message every time I try to close it, even if no data has been (or attempted) entered.
 
Just a suggestion, but don't make this a required field in the table design. Add some code that will validate that this field is not empty before the update or make this field default to today's date and the user can change if needed.
 
It is an unbound field, so it isn't linked to a table. It is the OnExit event code that is causing this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top