Results 1 to 3 of 3

Thread: in need of help.. please

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    66

    in need of help.. please

    guys..

    i really cant figure out whats wrong with my code..

    an error that says "too few parameters, expected 1"

    i used

    Dim findit As String
    findit = lblFind.Caption

    Set rsProject = dbSSS.OpenRecordset("SELECT * FROM Project WHERE Status = findit ")

    InitGrid
    FillGrid

  2. #2
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: in need of help.. please

    It might help if you posted all of your code... Too few parameters usually means you called a sub or function and didn't provide everything it needed to operate.

  3. #3
    Member
    Join Date
    Jan 2006
    Posts
    33

    Re: in need of help.. please

    What you want is the recordset to have values where status = the value in findit not the word findit. Plus you need to add the other parameters to the openrecordset function:
    Set rsProject = dbSSS.OpenRecordset("SELECT * FROM Project WHERE Status ='" & findit & "'", dbOpenSnapshot, dbForwardonly)

    Make sure, of course, that dbSSS is an open database and rsProject is declared as recordset and project is a valid table in the recordset.

    Good luck!

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