Problem with search buttons, need help :(

Duncan

New member
Local time
Today, 07:30
Joined
Mar 23, 2011
Messages
3
I am try to make a calender, where I can use mutlipal Search button linking to the same table of information, to be place in the data field on the form. I am looking for a way to get the search button to pull the correct info, as at the moment the first button fills in att the data fields with the same info and if you try the 2nd search button it changes all the field to the new search.
 
Hi my friend

I think I get the gist of your question but need a little more info. Is your form bound to the table you're searching? do you have any field names on the form and the table? What have done so far?

Also, if you break your question down to smaller bite-size units it might help.

Look forward to hearing from you
SamllTime
 
Hi SmallTime
First thanks for answering the question.

Ok what i have done so far,
The form is set up via the wizard linking it to the table with the following data
Premises number, Premises Flat, Premises Street, Post Code and Index No.
I then have two drop down menus linked to table for Time and Type.
The last thing is the search boxes which again were done though the wizard
giving the following Event Prodedures.

Search 1 (Wizard set)
Private Sub Command35_Click()
Dim buildingNum
buildingNum = InputBox("Enter the House Number", "Search for building")
DoCmd.OpenForm "House Number and Address"
[Form_House Number and Address].Filter = "[Premises No] = '" & buildingNum & "'"
[Form_House Number and Address].FilterOn = True
[Form_House Number and Address].OrderByOn = True
End Sub

Search 2 (My attempt)
Private Sub Search_2_Click()
Dim buildingNum
buildingNum = InputBox("Enter the House Number", "Search for building")
DoCmd.OpenForm "HNA1"
[Form_HNA1].Filter = "[Premises No] = '" & buildingNum & "'"
[Form_HNA1].FilterOn = True
[Form_HNA1].OrderByOn = True
End Sub

In the second search I was going for the detail to be pulled from a different table to
see if this would give different details in the feilds listed about (Did not work)

I hope this is waht you were looking for. If not please let me know.

Your
Duncan
 

Users who are viewing this thread

Back
Top Bottom