Results 1 to 2 of 2
  1. #1
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496

    Too few parameters on db.execute

    Can't see why this won't execute - I get a too few parameters 1 error

    Code:
    Dim strSQL As String
    strSQL = "UPDATE tblTourOrganiser RIGHT JOIN (tblAreas INNER JOIN tblSchools ON tblAreas.AreasID = tblSchools.AreaID) ON tblTourOrganiser.TourOrganiserID = tblAreas.TourOrganiserID SET tblSchools.CallBackDate = #" & Format(ChangeToDate, "mm/dd/yyyy") & "#" & vbCrLf & _
    "WHERE (((tblSchools.CallBackDate)<=#" & Format(YesterdayDate, "mm/dd/yyyy") & "# And (tblSchools.CallBackDate) Is Not Null) AND ((tblTourOrganiser.TourOrganiserID)=[TempVars]![tmpTO_ID]));"
    
    
    '!!!run the update!!!
    CurrentDb.execute strSQL, dbFailOnError


  2. #2
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    ah sorry guys working with querydef objects didn't realise...

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

Similar Threads

  1. Execute, "Too few parameters", "Expected 2"
    By jhrBanker in forum Forms
    Replies: 3
    Last Post: 10-30-2014, 02:18 PM
  2. Desire Data Execute
    By Eeshan in forum Access
    Replies: 6
    Last Post: 07-18-2013, 11:32 AM
  3. Update sql using currentdb.execute
    By laavista in forum Access
    Replies: 13
    Last Post: 08-15-2011, 03:51 PM
  4. db.Execute Error 3061
    By JimG in forum Programming
    Replies: 5
    Last Post: 05-17-2010, 09:34 AM
  5. Can't get any of my code to execute!
    By blacksaibot in forum Programming
    Replies: 4
    Last Post: 03-16-2010, 08:08 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