Full Version: Trying to update record on second subform in tabbed form
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
I am preparing a database for a winery. My database tracks wine competitions that we enter and results of those competitions. For each wine competition there may be a different entry every year.
I have a form to enter master information and information about each year that we enter the competition. My first tab has all the master information and it has a subform which has some basic information about each year that we enter. I have it set up so that when I click a command button, a new record is added for a new competition year.
On the second tab of the form is a subform that has some other information about that particular year's entry. This subform has the same record source as the subform on the first tab.
THere is my problem. I add a new year on the subform on the first tab. As part of that, I requery or refresh (I've tried it both ways) the subform on the second page. Now, I click on the second tab and look at the data in the subform. It does not have the new year I just added in the subform on the first tab. If I go back to the first tab and add yet another year, the first year I entered now shows up on the second tab's subform but the latest new year doesn't show up. How do I get the newest record to show up on the second tab's subform?
I've looked at other posts that seem to address similar issues, but none of what I get from them seems to work.
Note: I suspect that tabs have nothing to do with the problem. Please tell me if I'm wrong.
TIA for any ideas you have.
Thom Rose
Well I came up with one answer on my own. After I add the new record in the subform on the first tab and before I requery the subform on the second tab, I go to the previous record on the first tab and then go back to the record I just added.
This strikes me as kludgy, so if you know the right way to do it I would appreciate it.
That is your code at present to refresh the form?
Nice day here in Washington HUH!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.