Open a second form and return control to the first.

T

traveler

I have a routine that handles money transfers from one budget account to
another based on a form in which the user inputs all the relevant information
(called frmBudgetXfer). I have a second form (called frmDisplayCatTots) that
displays the totals for all accounts. On opening frmBudgetXfer I also open
frmDisplayCatTots to let the user see what the current totals are. I do this
from the Form_OnOpen event of frmBudgerXfer by executing a

DoCmd.OpenForm "frmDisplayCatTots", acNormal, "", "", acFormReadOnly,
acWindowNormal

The second form opens fine and processing continues in the first form. When
the transfer data is complete I want to redisplay frmDisplayCatTotals so the
user can see the new totals. Therefore, I have a button as the last step of
the account transfer routine that closes frmBudgetTotals, runs a query to
update all totals, then opens frmDisplayCatTotals with a

DoCmd.OpenForm "frmDisplayCatTots", acNormal, "", "", acFormReadOnly,
acWindowNormal

This all works fine except that focus is now on frmDisplayCatTotals and
processing has stopped on frmBudgetfer. I want focus to stay on frmBudgetXfer
and processing to continue on frmBudgetfer.

Is there a way to do this?
 
D

Damon Heron

I am a little confused by your description. You have frmBudgetXfer,
frmDisplyCatTots, and frmBudgetTotals. I am guessing the last one is an
error. In any event, Put your query on the first form and it should update
the second form without closing and re-opening.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top