On Close form not going back to the original form

  • Thread starter Geraldine Hobley
  • Start date
G

Geraldine Hobley

Hello,
I have a scenario whereby I'm on a form called
Called frmMain and within that form there is a subform
with continuous records on called frmSub.

On frmSub there is a button that opens up another form
frmOrder using the following command

DoCmd.OpenForm "FrmOrder", acNormal, , , acFormEdit,
acHidden


In frmOrder when you close the form you form it should
return to frmmain,
I have the following code

DoCmd.Close

Since I have put a form_current event in the frmSub the
frmOrder close event does not work.

firstly you have to click the button twice for the form
to close and secondly you are not returned to frmMain,but
to a list of all the forms.
It seems that just the existence of the form current
event in frmsub causes this problem, comment it out and
it all works fine.

Any ideas as to why this is happening or how to get
around it.

thanx in advance Geri
 
G

Guest

Geraldine,

First, based on your description, the acHidden option
when opening FrmOrder seems out of place...
DoCmd.OpenForm "FrmOrder", acNormal, , , acFormEdit, acHidden

Second, what action does the user take to close the FrmOrder. Click
the close box or a command button? If the former, the your
DoCmd.Close
is unnecessary and may be the source of the problem.

Third, have you tested this with VBA open? That should provide
additional info on the location of the problem.

Tom
 

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