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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can I use openargs value in a query...how

Status
Not open for further replies.

RBE

Programmer
May 25, 2000
72
US
Can I use the openargs value in a query, and how do I do that? RBE


Are you 100% sure of where you are going.
 
You would be opening your form something like

dim DocName as string, LinkCriteria as string
DocName = "MyForm"
LinkCriteria = "the criteria I want to pass"
'- for example a key to search on
DoCmd.OpenForm DocName, , , , , , LinkCriteria

In the Form being opened in the OnOpen event

dim mySQL as string
mySQL = "Select * from mytable where mycriteria = " _
& me.OpenArg
me.recordsource = mySQL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top