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

Save a form to a different table

Status
Not open for further replies.

acnovice

Programmer
Jan 27, 2005
100
US
I want to save a form to different table.

There is a form "frmVendorInq" base on "tblCustomerInq". After I enter data to "frmVendorInq", I want to save the form to "tblVendorInq".

I put "Save" command button on the form and default code came in the follwoing.

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Can I use the code to save it ? If then, what do I need to change ?

Thank you.
 
I would setup an Append query based on the tblCustomerInq that will append the tblVendorInq table. Use the Primary Key field from the frmVendorInq form as critera in your query. Then use your command button (or an event like On Close or After Update) to run the query to update the second table.

DoCmd.OpenQuery "UpdateVenInq
 
crobg,

Thank you for your answer... I will try that.

Have a good day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top