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

Need Help with a search form

Status
Not open for further replies.

Cricker2u

Technical User
Aug 31, 2006
6
CA
Good day! I need a form to start up first so that the user can search a field to see if it there so they can either show the information on the MAIN FORM or show a blank form so that the user can enter in the information.

Cricker
 
What have you tried so far ?
You may consider the DLookUp function.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV:
I am kinda new at this so I really haven't tried much. I did a bit of searching and what I found was to use the search/find feature in the MS ACcess itself and that is not what I want. I will look at the DLookUp function.

Cricker
 
Try creating a form that has all of the search functionality that you require; that appears before user reaches the MAIN FORM; and provides logic for branching to the proper form dependant on the contents of your tables.





Public function SearchAndBranchforthwith()

'depending on the ACCESS version you may have to
'open connection to data using ADO or perhaps can use DAO.


1. create and instance of necessary connection to database
2. open a recordset using a 'where clause' to limit returned records to the one(s) you have interest in.

3. Dependant on the content of the recordset (as limited by your sql statement). Branch to either new record entry or for to display existing record.

End Function


I think this is a pretty generic approach to such a situation and should work fine for you.

Amiel Summers
 
Amiel:
Thanks for the info. I should of explained that I am a REAL NEW user with ACCESS 2000. What you have said sounds great but to code it I really have no idea. I hope you can hrlp moi.

Thanks

Cricker
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top