Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OpenArgs property of DoCmd.OpenForm method 1

Status
Not open for further replies.

tranchemontaigne

Technical User
Apr 26, 2004
44
US
Is it possible to feed multiple OpenArgs? If so, how? Does anyont have a code example? I'm using MS Access 2000.

I want to open a form such that both DataEntry = True and NavigationButtons = False

when the form is opened from a specific command button.

(When opened from another command button I want to allow access to all records behind the form.) I realize I could create a second form to work around this problem, but would prefer to do all I could with a single form object.
 
One approach is to build all of your desired openargs segments into a single string, with some type of delimter between the parts.

OpenArgs = "DataEntry = True|NavButtons = False"

Then in the .Open event of the new form, parse out the individual items around the delimiter ("|"). You can use any characters that you want as the delimiter. My personal preference is to use the pipe character.


Good Luck
--------------
To get the most from your Tek-Tips experience, please read FAQ181-2886
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top