Search form

jibb

Registered User.
Local time
Today, 15:06
Joined
Dec 1, 2011
Messages
93
Hello,

I am needing to create a search form to search a table in a database. It needs to search for either Order number, supplier, product code or all or some of these and then display the results below.

A simple question but I can't get it to work.

Thanks!
 
Have a look here. If that doesn't work for you try google. There's lots of samples online about this.
 
Have a look here. If that doesn't work for you try google. There's lots of samples online about this.

Hi speakers :)

Now I want to do this but on a limited 3 field search and I want the form to open the Parent Form in the datadase I have, when the match is found.

Somthing like

Search for ID, FamilyName or First Name

When found Open the Patient Form to view.

Any help would be great tx :)
 
Hi Jibb,

Why not create a form with and unbound text field. In this field you can type the Criteria ( I am talking about 1 field only).
Then create a command button on that with the following code. Remember to change the fields to suit your own data. This works well on my database.
Regards
crdfox


Private Sub Open_Table_with_Serial_Number_Click() ' This is the name of the command button, it can be anything.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Fm_Update_Job" '(This is the name of the form to open)
stLinkCriteria = "SERIAL_NUMBER = Forms!Fm_Main!Text6" '( The first field is the one in the table and the second is the Form name and Field with the critera to find the record.)
' the below Opens the Form at the correct record
DoCmd.OpenForm stDocName, , , stLinkCriteria ' (This open up the form with the record match in the one you want.)


End Sub
 

Users who are viewing this thread

Back
Top Bottom