search function access 2003

RobM

New member
Local time
Today, 05:05
Joined
Nov 30, 2009
Messages
3
hello experts

Hope you are all well.

On to my question i have a form that displays all i have in my asset database what i woukld like to do is add a search button so when a user types in the serial number or anything else it then checks my database and shows the results in the form, doesn't have to be anything fancy as long as it does the job

The main reason i wanty to be able to do this is because i want standard user not able to see the toolbars just what i want them to

hope that makes sense :)
 
This is how I would do it:

1. Add a combobox in the form header that lists all the serial numbers (in the row source make sure the first column is the unique id of the main form form but hidden).

2. On the afterupdate of the new combo box add the following code(edit it to suit your needs)

Private Sub FindSerialNum_AfterUpdate()
If Me!FindRef <> "" And Not IsNull(Me!FindSerialNum) Then
With Me.RecordsetClone
.FindFirst "[UNIQUE ID NAME HERE] = " & Me![FindSerialNum]
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
Me!FindSerialNum= Null
Me![SEIAL NUMBER NAME HERE].SetFocus
End With
End If
End Sub
 
hi thanks for the reply

would this just restict the search to serial numbers only because what i want to do is to be able to search the entire database instead of using the find function
 
Sorry, after re-reading your post I see you did say 'serial number or anything else' but my solution would be just for serial numbers.

I don't have a solution for searching everything at the same time.
 

Users who are viewing this thread

Back
Top Bottom