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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can a subform bemade a compulsary item? 1

Status
Not open for further replies.

justagrunt

Technical User
Oct 10, 2002
132
0
0
Hi,
A basic question but then again I've missed out on some of the basics.
Main form has two subforms in a parent child relationship.
Can a subform be made a compulsary object to be filled out?
My understanding is that normally a subform only becomes active when it is highlighted and a feild filled.
I need to make a subform a compulsary object to be filled out before the user departs form the main form.
Any suggestions really appreciated.
Warm Regards
Bill
 
How are ya justagrunt . . .
Microsoft said:
[blue]For linked form with subform, [purple]you can't add/edit a record in a subform unless there's a saved corresponding linked record in the parent form![/purple][/blue]
So for starters, to edit a subform at all, existing record or new, [blue]a parent record has to exist[/blue]. The parent record is normally saved when you move the focus from the parent to the child (usually by clicking or tabing). You can verify this by moving to a new record on the parent and then trying to edit & save a record on the child. An error will be generated relating to all the above . . .

So what you really mean is [blue]validation![/blue] . . . that is:
TheAceMan1 said:
[blue]If a parent record exist, at least one child record has to exist![/blue]
The best event I can think of to accomplish this would be the [blue]Parents UnLoad event[/blue] which can be canceled. A loop thru all records stopping on detection of a parent record with no child record would do the trick!

Your thoughts?

Calvin.gif
See Ya! . . . . . .
 
Cheers The AceMan1,
immmmmmmmmmm.
I'll have a look into that and give it a go.
Warm Regards
Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top