Results 1 to 3 of 3

Thread: Database Search or Parameter Query

  1. #1

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    NE United States
    Posts
    62

    Unhappy

    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
    Does it ever get any easier?

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    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?

  3. #3

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    NE United States
    Posts
    62

    DataControl is Fine

    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

    Does it ever get any easier?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width