PDA

Click to See Complete Forum and Search --> : Database Search or Parameter Query


ausmoran
May 5th, 2000, 04:51 PM
I have been atttempting to run a parameter query at runtime in a simple VB6 application that is tied to an Access97 database. For some reason, I have not been successfull. Instead I started to work on a bit of code (thanks to Karl Moore) to included a command button to perform a search. The code is not working correctly...so I think I could use some help.

The table is named tbl_BoardNames
The field on which I'd like to search is called BOARDS
here's the code:

Dim BrdName as String
BrdName=InputeBox("What local Board are you looking for?")
data1.RecordSource = "select * from tblBoardNames " & _
"where BOARDS = '" & BrdName & "'"
data1.Refresh

Thanks in advance for any assistance you might be able to offer.

- Austin Moran

Edneeis
May 6th, 2000, 07:22 AM
Do you already have the Data control set to the right database? Make sure it is 'InputBox' not 'InputeBox'. What happens when you try it? Did you open the recordset?

ausmoran
May 6th, 2000, 03:37 PM
Thanks for checking in! The data control on the form, as well as the bound text boxes work fine. It is only the bit of code behind this bloody SEARCH button that fails to function correctly! urggghhhhhh! Thanks for any help you might be able to send my way!

Austin