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

Save Record and Add two more Records with one Field Changed.

Status
Not open for further replies.

dmon000

Technical User
Sep 9, 2003
79
US
I have a form that saves a diet order for a patient in an "Order Detail" table. Presently it saves one record for one particular meal (breakfast, lunch or dinner).

Management now wants 3 records (breakfast, lunch, dinner) saved for each order from the same form.

How do I save two more records with all the data the same except for the one field "meal", which will need to be changed to "2" and "3" for lunch and dinner, respectively?

Currently the information in the form is save to the "Order Detail" table with the follwing: "DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70"

Thanks!!!

 
Is this for school?

____________ signature below ______________
You are a amateur developer until you realize all your code sucks.
Jeff Atwood

 
Saving a record is the default for Access, so you may find that the line above is not doing that much. You could use the RecordsetClone to add two more copies of the record to the table or you could add an append query to the save button that append two records based on the current record. The RecordsetClone idea may be the easiest.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top