Subform.

  • Thread starter Thread starter SS
  • Start date Start date
S

SS

I am using Office 2000, and I am designing a form, with a
subform in it. The form contains personal details of
clents, and the subform contains the items they have
hired. The relationship between the two tables is via a
customer ID.

The form is used to enter and update new clients and their
detaild. Everything is working well, but what I need is
when you enter a customer ID for it tolook and seee if
that ID is alreay existing and takes you to that record.
If it doesn't you just keep on entering the rest of the
details.

Currently when you enter a existing ID the existing
subform is brouoght up, but a new rewcord is created, with
the same customer ID. This brings up an error message.
 
How I would do something like that is the field the you
enter the customer ID is an unbound text field that you
code an AfterUpdate event. The real bound customer ID
field in also on that form, but is is invisible.

The script would check to see if the record exists in the
recordsetclone, if it doesn't, copy the ID to the hidden
field and continue with data entry. If it exist use the
recordsetclone findfirst command.
 
Back
Top