Bypass the OnOpen (1 Viewer)

smehnert

Registered User.
Local time
Today, 16:59
Joined
Jun 15, 2005
Messages
13
Hi all...

I have a form that OnOpen does;

DoCmd.GoToRecord , , acNewRec

But, I also call it from another form, using a criteria, but because of the OnOpen event within the form it goes to a new record.

I need to be able to bypass the OnOpen event or find a different way of opening the form to goto a new record...

Please help!

Simon
 

carash77ash

Registered User.
Local time
, 01:59
Joined
Jan 13, 2006
Messages
81
when you want to enter a ne3w record do you open that form form the switchboard. If so just set the properties on switchboard to open that form in addnew. And delete the on open event.

If not you can use the is loaded function.

eg
on from_open ()
if isloaded (parentform) then
docmd.gotorecord,,,(filter)
else
docmd.gotorecord,,addnew
end if

Hope this helps

Ash
 
Last edited:

Users who are viewing this thread

Top Bottom