Results 1 to 2 of 2

Thread: Need another set of eyes

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2001
    Posts
    15

    Red face

    Using Visual Basic 6.0 with DAO

    I have the value of text box stored in variable sID which is passed to the function using this select statement. This variable is an integer, and id is generated as an AutoNumber in Access. Something missing but I can't see what. I have "Too few parmeters, expected 1", message.

    Set myrecordset = table.OpenRecordset("SELECT * FROM table WHERE id = sID", dbOpenDynaset)
    Last edited by robbmann22; Apr 4th, 2001 at 08:30 AM.

  2. #2
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621
    Try

    Set myrecordset = table.OpenRecordset("SELECT * FROM table WHERE id =" & sID, dbOpenDynaset)
    Gary Lowe
    VB6 (Enterprise) SP5
    ADO 2.6
    SQL Server 7 SP3

    OK I know my spelling and grammer is crap so don't quote me on it!

    To err is human to take the P! is only natural !!

    Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip


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