All,
I am relatively new to Access and VBA but have programmed for years in Visual dbase and more recently dBase 8 Plus. The transition has gone very well as I port a legacy 16-bit app over to Access. Until now.
I have been stuck for several days on getting a form to update a Datasheet contained within a Navigation Subform, after I have saved the edits in the form.
Based on suggestions elsewhere, I have tried every possible permutation of form names, NavigationSubform names, bangs, dots, OnClose, OnCurrent, AfterUpdate, events etc. and it still will not work.
To summarize, the hierarchy I am working with is as follows:
1. Main Menu form: Menu-Main
2. SubForm1: NavigationSubform1 (tabbed Navigation Form)
3. Subform2: NavigationSubform2 (tabbed Navigation Form - Contains VendorMain on tab #3)
4. Form: VendorMain - Form containing a Datasheet based on [Vendors Query] with Add /Edit Command Buttons
4. Form: VendorForm (Editing form called by VendorMain's Command Buttons)
**NOTE: I am using overlapping forms and VendorForm is opened as a "standalone" form and not within a subform. VendorForm uses its own query and is not linked to the query of VendorMain. (<--Is this the source of my problem?)
To be clear:
Subform1 is tabbed and contains a second tier of Navigation Tabs. Tab #3 is "Operations"
SubForm2 is also tabbed. Tab #2, "Vendors" contains a link to a form called VendorMain.
VendorMain contains a Command Button called EditButton.
EditButton passes the correct record identifier and opens an editing form: VendorForm.
Upon saving my edits in VendorForm, all I am trying to accomplish is an requery of the Datasheet in Vendormain so that the edits are reflected.
I have tried placing the Requery command in both VendorMain and VendorForm, in every possible Event. All have failed.
The obvious(?) choice would be to place the following in the "Save" button's OnClick event in VendorForm: Forms!Menu-Main!NavigationSubform1!NavigationSubform2.Form.Re query
However, doing so results in an error: "There is no field named Forms!Menu-Main!NavigationSubform1!NavigationSubform2 in the current record."
Can anyone offer a solution? I am at a complete dead-end here.
-Paige
(Please excuse the all-italics. This was copied in from a post in another Access forum.)