Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    WickidWe is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2013
    Posts
    123
    I had already fixed the quotation marks before running but now I get a new Error
    Click image for larger version. 

Name:	debug.png 
Views:	4 
Size:	22.3 KB 
ID:	14848

    this is how the code looks now.
    Code:
    strSQL = "INSERT INTO tblRosterRec ( Date_, FctnID, EmpId, Name ) " & _
    "SELECT tbl36hrWeekRosters.Date_, tblFunctions.ReliefCode, qryAllocated.EmpId, qryAllocated.Name " & _
    "FROM tbl36hrWeekRosters, qryAllocated INNER JOIN tblFunctions ON qryAllocated.FctnDesc = tblFunctions.FctnDesc " & _
    "WHERE tbl36hrWeekRosters.Date_=#" & Me.txtDate & "#;"
    it is only stopping at the "dbs.Execute (sSQL)"

  2. #17
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    I really can't see anything wrong with the sql or the procedure. If this doesn't work, want to provide the db for analysis?

    CurrentDb.Execute "INSERT INTO tblRosterRec ( Date_, FctnID, EmpId, Name ) " & _
    "SELECT tbl36hrWeekRosters.Date_, tblFunctions.ReliefCode, qryAllocated.EmpId, qryAllocated.Name " & _
    "FROM tbl36hrWeekRosters, qryAllocated INNER JOIN tblFunctions ON qryAllocated.FctnDesc = tblFunctions.FctnDesc " & _
    "WHERE tbl36hrWeekRosters.Date_=#" & Me.txtDate & "#"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 03-14-2013, 12:39 PM
  2. Export "Query or Report" to a "Delimited Text File"
    By hawzmolly in forum Import/Export Data
    Replies: 3
    Last Post: 08-31-2012, 08:00 AM
  3. Replies: 4
    Last Post: 07-25-2012, 04:01 AM
  4. Replies: 2
    Last Post: 11-04-2011, 02:45 AM
  5. "Group By" causes "ODBC--Call Failed" error
    By kaledev in forum Queries
    Replies: 1
    Last Post: 03-09-2011, 02:43 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