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

VBA checkbox to add new record in new table

Status
Not open for further replies.

iuianj07

Programmer
Sep 25, 2009
293
US
Hello guys,

I am creating a database that has 2 forms, Form1 which is bound to Table1 and Form2 which is bound to table2.

On Form1, there is a FacilityNumber(data field-primary key)textbox and an ASR Requested checkbox.
On Form2, there is a FacilityNumber(foreign key to Form1)


What I need to do though, is whenever the ASR Requested checkbox is checked, a new record will be created in Form2, with the corresponding FacilityNumber...

I think a VBA is needed for this one.

Any help is greatly appreciated.

Thank you


 
You should create records in tables, not forms. What happens if someone checks and unchecks the ASR box multiple times (nervous)? Do you want one record added for each action?

Once you add records to the child table, you can requery the child form.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top