All,
I am new to Access and VBA, having decided to take the plunge after years of programming in Visual dBase and more recently dBase 8 Plus. So far I am loving the switch and things are progressing well.
PROBLEM: I have seen numerous posts about requerying forms/sub-forms that are similar to my problem, but none that seem to fit it exactly. Apparently it is often a source of confusion and I hope someone here can offer a simple solution. I am sure it is simple problem, but I have been stuck for a while now.
In short, here is what I am trying to accomplish:
1. I have a two-tier, tabbed Navigation form (Menu-Main).
2. One of the second-tier tabs opens a form (VendorMain) which displays a Datasheet based on [Query.Vendor_Query]
3. VendorMain contains a Command Button (EditButton), which calls a subform (VendorForm) used for editing.
4. Upon saving the edits, VendorForm's OnClose event is supposed to Requery the datasheet on VendorMain, so the edits are reflected when the user returns.
I have tried over a dozen different permutations of the following, but nothing seems to work:
Me!Parent.Requery
Forms!VendorMain.Requery
Forms![Vendor_Query].Requery
Forms!Main-Menu!VendorMain.Requery
Etc...
VendorForm opens, edits, saves and closes perfectly. However, I consistently get the following error and the parent form is not requeried:
Runtime Error 2450 - Cannot find the referenced form VendorMain
Code available upon request.
Any help would be greatly appreciated.
-Paige :banghead:
I am new to Access and VBA, having decided to take the plunge after years of programming in Visual dBase and more recently dBase 8 Plus. So far I am loving the switch and things are progressing well.
PROBLEM: I have seen numerous posts about requerying forms/sub-forms that are similar to my problem, but none that seem to fit it exactly. Apparently it is often a source of confusion and I hope someone here can offer a simple solution. I am sure it is simple problem, but I have been stuck for a while now.
In short, here is what I am trying to accomplish:
1. I have a two-tier, tabbed Navigation form (Menu-Main).
2. One of the second-tier tabs opens a form (VendorMain) which displays a Datasheet based on [Query.Vendor_Query]
3. VendorMain contains a Command Button (EditButton), which calls a subform (VendorForm) used for editing.
4. Upon saving the edits, VendorForm's OnClose event is supposed to Requery the datasheet on VendorMain, so the edits are reflected when the user returns.
I have tried over a dozen different permutations of the following, but nothing seems to work:
Me!Parent.Requery
Forms!VendorMain.Requery
Forms![Vendor_Query].Requery
Forms!Main-Menu!VendorMain.Requery
Etc...
VendorForm opens, edits, saves and closes perfectly. However, I consistently get the following error and the parent form is not requeried:
Runtime Error 2450 - Cannot find the referenced form VendorMain
Code available upon request.
Any help would be greatly appreciated.
-Paige :banghead: