General discussion

Locked

'Find' on both form and subform

By Adisha ·
I have a Access 2003 form with a form and subform. Can anyone guide me on how to create a contextless find so the user can search both the form and subform. At the moment the find is defaulting to where command button or the cursor is positioned. To summarise, I would like to be able to search all fields on both form and subform.

Many thanks for your help in advance.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Adisha In reply to 'Find' on both form and s ...

Point value changed by question poster.

Collapse -

by JEPott In reply to 'Find' on both form and s ...

It's been a while since I did work in Access, but in short I believe this is what you will need to do. You will need to write some VBA for the search function to first search one form and then the next - you would probably want to search the 'current' form (the form with the focus) and then switch the focus to the next form and search it. Off the top of my head, this seems like it could end up being a lengthy sub-routine running a DO WHILE loop or something similar.

I hope that gets you pointed in the right direction.

JEPott

Collapse -

by tdambra In reply to 'Find' on both form and s ...

I suggest you create a parameter query joining the two recordsources using a one-to-many join, where the parameter is the control value on the form/subform you wish to search on, and then run the query in VBA to return the record/s required...

Back to Software Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums