A real begineer
Registered User.
- Local time
- Today, 21:55
- Joined
- Nov 4, 2000
- Messages
- 74
My application has a master switchboard, for directing the users to other forms. On first load on first use on first day there is some data that needs collecting and should never be needed again.
I thought it would be a simple matter of telling my master switch that on load to hide itself and pull up another form for input of tank diameter (for example), however when I write the code it does not seem to work.
The tank diameter form pops up and refuses to take the focus.
Below is one of the permetations of code I have tried.
If blnA=False then
Docmd.OpenForm "frmChlTnk",,,stLinkCriterea
Form_FrmMasterSwitchboard.Visible=False
Form_FrmChlTnk.SetFocus
end if
I have attempted changing the order within this code, e.g. make master form invisble before loading and so on.
Currently this code is sitting in the on load event, I have tried locating it in the on open, on activate, on mouse move and a few others.
In all cases it appears to me, the code is running before master form completely loads itself. This results in the tank form, loosing the focus forced in code, I think I need to stop the process, but do not know how.
I thought it would be a simple matter of telling my master switch that on load to hide itself and pull up another form for input of tank diameter (for example), however when I write the code it does not seem to work.
The tank diameter form pops up and refuses to take the focus.
Below is one of the permetations of code I have tried.
If blnA=False then
Docmd.OpenForm "frmChlTnk",,,stLinkCriterea
Form_FrmMasterSwitchboard.Visible=False
Form_FrmChlTnk.SetFocus
end if
I have attempted changing the order within this code, e.g. make master form invisble before loading and so on.
Currently this code is sitting in the on load event, I have tried locating it in the on open, on activate, on mouse move and a few others.
In all cases it appears to me, the code is running before master form completely loads itself. This results in the tank form, loosing the focus forced in code, I think I need to stop the process, but do not know how.