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

Search Window

Status
Not open for further replies.

desireemm

Technical User
Dec 17, 2003
50
US
I created a database with Access xp on the front end(ADP) with SQL Server 2000 as the engine. I used the DTS to migrate the data over from and MDB file. Anyway
I need to make a homemade Search form for my users....one that they can press a button type in lastname or TM#, FirstName or SSN and BAM!!!!!! theres the results populated on the form. Anyone know of any good sites where I can obtain some info on how to create one of these or something??

I Used [] in queries and it would ask me for parameters, cant seem to do that with an adp though. Trying to create a search form by using the LIKE parameter in an SQL statement for ADP. Perhaps a Search Field.

I was wondering if this could be done through a stored procedure? I'm still learning about sql so I was hoping someone could give me some tips Please.

Thank you
 
So you are searching in the SQL database? And then you're using Access forms for the front end?
 
Stored procedures can take input parameters which can be your search field values. (Parameters in SPs start with the @ sign.)

Then your query within the sp would be something like:
Code:
Select field1, field2 from table1
where (@field1 is null or field1 = @field1)
and (@field2 is null or field2 = @field2)

Questions about posting. See faq183-874
Click here to learn Ways to help with Tsunami Relief
 
Thanks guys I'll show you my script as soon as I'm done. I have created some stored procedures before I just have mastered the process yet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top