Results 1 to 2 of 2
  1. #1
    boywonder381's Avatar
    boywonder381 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Location
    Memphis, TN
    Posts
    28

    Unhappy Recordset Given too few parameter error

    I'm getting the following error:

    Runtime Error '3061'

    Too few parameters. Expected 1.

    =====

    Here's my recordset setup:

    'Grab count of all employee attending a class
    strEmployee = "SELECT * FROM [TEmployee] WHERE " & _
    "(((TEmployee.Shift) = '" & strShiftName & "') AND " & _
    "((TEmployee.Courses) = '" & strCourses & "') AND " & _
    "((TEmployee.Classroom) = '" & strClass & "') AND " & _
    "((TEmployee.StartTime) = #" & Format(dStartTime, "h:nn") & "#) AND " & _


    "((TEmployee.EndTime) = #" & Format(dEndTime, "h:nn") & "#) AND " & _
    "((TEmployee.SchedDate) = #" & Format(dClassDate, "m/d/yyyy") & "#))"

    Set rsEmployee_Headcount = dbs.OpenRecordset(strEmployee)
    j = rsEmployee_Headcount.RecordCount

    What I'm I doing wrong...

  2. #2
    boywonder381's Avatar
    boywonder381 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Location
    Memphis, TN
    Posts
    28
    I fixed it. I'm just tired. It was the TEmployee.Shift, should be TEmployee.Shifts. Good night.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 10-31-2014, 07:42 AM
  2. Recordset Open Error
    By RayMilhon in forum Programming
    Replies: 4
    Last Post: 08-27-2013, 05:54 PM
  3. Replies: 3
    Last Post: 03-06-2013, 03:52 PM
  4. Recordset Error
    By gazzieh in forum Programming
    Replies: 3
    Last Post: 02-17-2012, 05:13 PM
  5. Syntax Error Help with Recordset
    By ajetrumpet in forum Programming
    Replies: 11
    Last Post: 09-08-2010, 02:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums