Setting DefaultValue

  • Thread starter Thread starter paduanow
  • Start date Start date
P

paduanow

I have 2 tables Client_Info and Inquiry

Client_Info table stores Client ID and other information about the client.
There is one record in this table.

Once the client inputs information into the table, he clicks the save and
exit button and closes the form and table. At this point, I want to change
the DefaultValue in table "Inquiry", field "Claimant ID" to equal table
"Client_Info", field "ClientID". I tried

Inquiry.[Claimant ID].DefaultValue = Client_Info.ClientID
 
Open Client_Info table in design view and make Client ID the primary key by
clicking on the icon that looks like a gold key. Save.

Open the Relationships window, add both tables, Click on Client ID and drag
to Claimant ID, select option for Referential Integerity and Cascade Updae.
Save.

Create a form for Client_Info table information. Save.

Create a form for Inquiry table information. Save.

Add Inquiry form to Client_Info as a subform, setting Master/Child links
using Client ID/Claimant ID. Save.

Open Client_Info form, scroll to client, add record to Inquiry subform and
it automatically includes the Claimant ID matching Client ID.
 
Back
Top