View Full Version : Search Button via VB


mcclunyboy
10-08-2009, 01:06 AM
Hi,

I have 2 almost identical forms within the same databases which both have the same set up. I did not create this database but have been maintaining it for the last year. The problem I am having is related to a search button.

As I said both forms are almost identical in layout and functions just related to different tables/queries. On one form the search is working fine but on the other the button only refreshes the screen without displaying the search results.

I really don't know where the problem lies so I am likely going to give you info when you ask for it.

The Code behind the "search button" which isnt working is (slightly different to other form, the other only has Form.Refresh - i have tried simply that):

[Services List].LinkMasterFields = ""
[Services List].LinkChildFields = ""
Form.RefreshThe code behind the "search textbox" which isnt working is (same as other form):

Private Sub searchbox_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Form.Refresh
End If
If KeyCode = vbKeyDown Then
Me.[Attractions Mini Search Results].Form!Name.SetFocus
End If

End SubAny idea what I need to do to get it working again?

mcclunyboy
10-08-2009, 01:16 AM
Actually I should point out I am certain it is not the VB code behind the text box - that is identical to the other form and there should be no reason it is not working.

I think it is something missing either within the search button on the form itself.

mcclunyboy
10-08-2009, 03:21 AM
actually just ignore this - too complicated to include all the vb on here and make sense of it

just close this thread please

boblarson
10-27-2009, 10:21 PM
kalpana's spam post reported to mods/admins