Results 1 to 3 of 3

Thread: SQL Execution Error - Easily Solved?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2000
    Posts
    132

    Angry

    this is the code from my program and i have a problem with it.

    Private Sub SearchBand_Click()

    Dim bandsql As String
    bandsql = "Select * from cd_serial_numbers where band_name = ' " & txtband.Text & " ' "
    Let Data1.RecordSource = bandsql

    Data1.Refresh

    End Sub

    After i press the button it fails to refresh the grid. The error message is:
    Run Time error '3078'

    The Microsoft Jet Database engine cannot find the input table or query "". Make sure it exits and that its name is spelled correctly.

    Now it does exist and yes it is spelt correctly so what is the problem?????
    Reality is an illusion caused by by lack of drugs

    Is this real or am i just having a dream?

  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374
    Originally posted by Harrild
    Run Time error '3078'

    The Microsoft Jet Database engine cannot find the input table or query "". Make sure it exits and that its name is spelled correctly.
    It looks like you are passing a blank parameter into the SQL, because according to the error message the Jet engine is looking for a table or query with no name, hence the "". Put the code
    Code:
    Debug.Print txtband.Text
    before you assign anything to bandsql, and make sure that you are passing the correct table name into the code.

  3. #3
    New Member
    Join Date
    Jul 2000
    Location
    UK Essex
    Posts
    12

    Talking

    Check the reply to the earlier posting it should sort your problem...

    READ YOUR REPLIES!

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