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

Using OpenArgs to filter data in new Form.

Status
Not open for further replies.

DerickD

IS-IT--Management
Sep 19, 2002
93
LU
Hi all,

A small problem that should be straight foward....

I have Form 'A' that lists all the People in the company. The user will highlight one of the names and press the button 'Summary'

This will open form 'B' that contains data using a query that combines all the Persons information.

I am using the [OpenArgs] parameter to open the second form, but I can not find a way of filtering the information so that just the selected persons data is viewed.

I tried passing the [OpenArgs] to a fieled in the Form and then using :


Me.RecordsetClone.FindFirst "[PersonName] = '" & OpenArgs & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark


But this does not update any thing..

Any comments or suggestions welcome,
Thanks,
 
Do you want to move to that person's details, allowing you to scroll backwards & forwards thu the list, or just show that individuals details?
To do the latter, on your OnOpen event you need

me.RecordSource="SELECT * FROM tblPersonInfo WHERE tblPersonInfo.Name='" & openargs & "'"

To do the former I think you need to change the event you set the bookmark. It won't work on the OnOpen event, try it OnLoad, which runs when the form is loaded.

hth

Ben

----------------------------------------------
Ben O'Hara

"Where are all the stupid people from...
...And how'd they get so dumb?"
NoFX-The Decline
----------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top