Code to open form in add new record mode???

bsnapool

Registered User.
Local time
Today, 06:18
Joined
Nov 17, 2006
Messages
96
Hi

Could anyone help with code to open my form in add new record mode?

Thanks in advance

Andrew
 
I've not tried this, but it might be something like


docmd.openform formname:="myform" openargs="dataentry"

then in the form open event
try
if openargs = "dateentry" then me.dataentry = true

----------------------
or you could have two forms, one normal and one dataentry, and just open the appropriate one
 
Thanks for your reply Gemma

Code:
docmd.openform formname:="myform" openargs="dataentry"

Were would i put this code then?

Two different forms ? how would this approach work and how would i go about doing this?
 
first two forms

copy your form with an appropriate other name

one of the forms properties (data tab i think) is dataentry. if set to yes, this only allows a user to add new records, not to see any records already in the file.

----------------------
secondly, you may be able to do this dynamically as I say. However you are opening the form, you may be able to issue the openform command with appropriate openargs, as I said.
 

Users who are viewing this thread

Back
Top Bottom