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

Help with an On Load event....

Status
Not open for further replies.

3Mark3

Technical User
Nov 30, 2005
48
US
Afternoon everyone and Happy Friday!

I have a question I'm hoping someone can help with. I have a subform that is tied to a query. I would like to have a box which will ask the person their first name (I already know how to do this part). What I would like to do...is based on what name they put in, I would like to load that persons query.

For instance, if someone types in Mark, I would like the subform to load Mark's query, instead of say Mary's Joes,

I know this is probably an on load event in the subform, but I don't know how to set that up.

Any help would be greatly appreciated. Thank you all!
 
Not sure how it all relates to your original form, but just from the info given, why don't you use the field you are talking about for name as a parameter in the query that looks to the subform, then use the AFTER UPDATE for the field to REQUERY the subform.

If you are not sure of the syntax for referencing the field from the form for the query, make sure your form is open then go to the query and on the criteria line, hit build, find the form and field and OK the reference...

Let me know if you have trouble with the requery syntax
 
How arr ya 3Mark3 . . .

Why not have a [blue]listbox[/blue] on the form where members can select their names and simply update the [blue]RecordSource[/blue] of the form with the proper query?

Be aware . . . any member can see any other members data this way! You may wanna think about passwords!

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top