>> Parent / Child Relationship

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, Access 2002.

Here's the situation... I have a main form for Customers. The first tab has
Customer details. The second tab has a subform with Contacts details.

The problem is that I want to ensure that a user does not create a Customer
record without at least one contact. That is the user cannot navigate to
another Customer record or close the form until the new customer record has
at least one contact.

The only thought that I have is to control the navigation buttons...

Any ideas appreciated :-)

Many thanks
Jonathan
 
I'm sure that it's possible to do it via various beforeupdate type
conditions but I have to say that I hate them. The easy way to do it is to
disable any additions on the main form and just add a 'New' option. That
opens an unbound form containing all the fields you require. If they are
all there then append them back onto your main tables and refresh the form,
if not then display an error.
 
Back
Top