-----Original Message-----
Create your form. Set the form to Continuous Forms view.
Put the two textboxes on it in the form's Header section. Also put a command
button in the heade section.
Bind the form to a query that will return the desired records. For the two
fields that are to be filtered based on the textboxes, put criterion
expressions similar to this for each:
[Forms]![MySearchFormName]![TextBoxName1] Or
[Forms]![MySearchFormName]![TextBoxName1] Is Null
Code the OnClick event of the command button with code similar to this:
Private Sub CommandButtonName_Click()
Me.Requery
End Sub
In the Detail section of the form, add controls that are bound to the fields
in the form's recordsource. Also put a command button with the controls;
this button will be used to open a second form that will display the desired
info. On this button's OnClick event, put code similar to this:
Private Sub CommandButtonOpenRecord_Click()
' Use this line if Primary Key field is numeric
DoCmd.OpenForm "NewFormName", , , _
"[PrimaryKeyFieldInQuery]=" & _
Me.ControlNameBoundToPrimaryKeyField
' Use this line if Primary Key field is text
' DoCmd.OpenForm "NewFormName", , , _
"[PrimaryKeyFieldInQuery]='" & _
Me.ControlNameBoundToPrimaryKeyField _
& "'"
--
Ken Snell
<MS ACCESS MVP>
To whom can help with my problem
I want to place a form in my database that will have the
text boxes on it. Text box 1 (Surname) Text box 2
(PostCode)
I want to create a searcbox that when you type in either
of those boxes you get a list of corrisponding details,
you then click on it and it opens that record.
How do you do that step by step
Regards Joel
.