Command buttons...linking forms (1 Viewer)

otis1969

Registered User.
Local time
Today, 06:57
Joined
Mar 13, 2003
Messages
42
HELP!! I have a form that is used to input the data for fishermen. The form is for their personal information (company,address, city, prov, etc). The table that holds this information uses an autonumber. The PK is irrelevant to any paperwork that is kept on the fishermen, so the FishermanID (autonumber) is not needed on the form.

I would like to have a command button on the form to add a fishing licence. The licence is in its own table along with the year (FK is FishermanID). When I create the command button, the form opens fine showing the year and licence number of the fisherman, but when i try to add new licence, I get the error that there is a required entry in the fisherman table.

I really hope this all makes sense!
 

Rob.Mills

Registered User.
Local time
Today, 01:57
Joined
Aug 29, 2002
Messages
871
In your second form you need to create a textbox whose controlsource is FishermanID. Then set the default value of that textbox to Forms![First Form]![FishermanID].

Probably a good idea to hide it as well.

What this does is set the value of that field. It probably wasn't getting set before and it's probably a required field.
 

Users who are viewing this thread

Top Bottom