Results 1 to 4 of 4
  1. #1
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,329

    Runtime error 3061

    Hi Guy's can anyone tell me why i get runtime error 3061 on rs9 ???

    Cust = Forms!frmMainMenu!frmIndex1!cboCustomer
    Src = "Acc"
    MyStatus = "Planning"
    MyStatus2 = "Friday"
    MyStatus3 = "Monday"
    mHold = "On Hold"
    mYes = "Yes"


    MyDate = Format(Me.txtUpdate, "mm/dd/yyyy")




    Set rs8 = CurrentDb.OpenRecordset("SELECT tblAssign.ProductNo, tblAssign.SONumber, tblAssign.DelTo, tblAssign.ProductType, tblAssign.PONumber, tblAssign.Shipped, tblAssign.DeliveryDate, tblAssign.xlRow FROM tblAssign WHERE Customer = '" & Cust & "'" & " And Source = '" & Src & "'" & " And LiftType = '" & FL & "'" & " And DeliveryDate = #" & MyDate & "#" & " ORDER BY xlRow;")


    Set rs9 = CurrentDb.OpenRecordset("SELECT tblCollections.ProductNo, tblCollections.SONumber, tblCollections.DelTo, tblCollections.ProductType, tblCollections.PONumber, tblCollections.Shipped, tblCollections.CollectionDate, tblCollections.xlRow FROM tblCollections WHERE Customer = '" & Cust & "'" & " And Source = '" & Src & "'" & " And CollectedDate = #" & MyDate & "#" & " ORDER BY xlRow;")

    with regards

  2. #2
    accesstos's Avatar
    accesstos is offline Expert
    Windows XP Access 2007
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    551
    Hi Dave!
    Is there a field named "CollectedDate" in the table "tblCollections"?

    Maybe you should say CollectionDate= #" & MyDate & "#"

  3. #3
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,329
    accesstos, you are a star

    I incorrectly typed the rs line, it is called CollectedDate but in the criteria I had CollectionDate instead of CollectedDate

    Can't see the wood for the trees and all that jargon haha

    Kindest

  4. #4
    accesstos's Avatar
    accesstos is offline Expert
    Windows XP Access 2007
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    551
    You are welcome Dave!

    Usually, I make it better with the chainsaw. :-D

    Cheers!

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

Similar Threads

  1. Replies: 4
    Last Post: 11-19-2018, 03:26 PM
  2. Runtime error 3061
    By caniread in forum Programming
    Replies: 7
    Last Post: 01-31-2017, 05:07 PM
  3. Replies: 3
    Last Post: 02-26-2016, 12:34 PM
  4. Runtime Error 3061. Too few parameters, expected 2
    By Gina Maylone in forum Programming
    Replies: 35
    Last Post: 01-13-2014, 02:37 PM
  5. Runtime Error 3061 Expected 3
    By kumail123 in forum Programming
    Replies: 1
    Last Post: 03-28-2012, 09:44 AM

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