NickBridgens
Registered User.
- Local time
- Today, 18:41
- Joined
- Nov 29, 2001
- Messages
- 13
Ok, here's the problem.
I have a customer form A that for various reasons I have not allowed the user to add records on, they click a button, open a new customer form B, create a new record and then click the save / close button. Only if I click the button on form A to requery, can I now see my new record, but how can I get the code that saves the record and closes form B to also requery form A so the user doesn't have to do anything.
On the same lines, the subform of form A is a brief view of the subtable, so to create a new subrecord, the user clicks a button, launches the newvehicle form, creates a new vehicle and then clicks save / close. Only by moving from record A to record B and back again do I see the new contents of the subform.
I tried
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Forms!Customers!CustomerVehicles.Refresh
DoCmd.Close
as the code for saving a new vehicle record from the vehiclenew form (customers is the main form, customervehicles the subform) but it just objected.
Any suggestions welcomed...
Nick Bridgens
I have a customer form A that for various reasons I have not allowed the user to add records on, they click a button, open a new customer form B, create a new record and then click the save / close button. Only if I click the button on form A to requery, can I now see my new record, but how can I get the code that saves the record and closes form B to also requery form A so the user doesn't have to do anything.
On the same lines, the subform of form A is a brief view of the subtable, so to create a new subrecord, the user clicks a button, launches the newvehicle form, creates a new vehicle and then clicks save / close. Only by moving from record A to record B and back again do I see the new contents of the subform.
I tried
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Forms!Customers!CustomerVehicles.Refresh
DoCmd.Close
as the code for saving a new vehicle record from the vehiclenew form (customers is the main form, customervehicles the subform) but it just objected.
Any suggestions welcomed...
Nick Bridgens