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

Urgent! Search main + subforms

Status
Not open for further replies.

Bob500

Technical User
Aug 8, 2003
65
EU
Hi,

I have to get this done by this week any ideas would be great. I have created a standard search button using access' wizard. the code on the onclick event is as follows:
-------------------------------------------
Private Sub Command205_Click()
On Error GoTo Err_Command205_Click

Screen.PreviousControl.SetFocus
docmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_Command205_Click:
Exit Sub

Err_Command205_Click:
MsgBox Err.Description
Resume Exit_Command205_Click

End Sub
-----------------------------------------
This only searches data within the main form, how can I enable the searching of data within subforms from the same search pop up box?

Many thanks.
 
Bob,

I'm a little confused about what you're trying to get going here. Can you tell us something about what and how you're searching, with some table descriptions, etc? Then maybe I can offer something. A little more background can help out a lot!

Thanks,

-Patrick

Nine times out of ten, the simplest solution is the best one.
 
Hi,

Firstly my database is based on individual applicants that can have many sites.

I have a table that has details of each individual applicant, this includes their names and addresses. This table is a subform on the main form.
The main form holds details of each applicants site which includes an ID number and address.

Presently I can only search by the site details on the main form, (the 'search' I am talking about is the same as pressing CTRL+F in Word etc. Just type in a field and you can fins any matching words. )
 
Bob,

Have you through about using queries to search instead of the find feature (Ctrl-F)? That might give you the flexibility to do what you need to do.

-Patrick

Nine times out of ten, the simplest solution is the best one.
 
Not sure how I would implement that, any pointers?

Thx
 
Bob500, ptpaton is right, first build a query which gives you all of the data you want, call it qryEmployee or something. Then create a command button with the wizard and select run queryies from the miscellanious tab, and select your new query. Everytime you click the command button you will run your query. Hope that helps.
 
Bob,

Quest said it all for me. Give us specific table names if you need help with the queries. The help file on Access does a good job explaining how queries work and how to design them. Take a look at it and shout out for help if you need it.


-Patrick

Nine times out of ten, the simplest solution is the best one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top