Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2015
    Posts
    4

    Unanswered: exporting query to exel (run-time '2465')

    Hi,

    I'm the begginer in VBA. While running below code I get Run-time error '2465' (Access can't find field "|1" .......)
    DoCmd.TransferSpreadsheet acExport, , "qry_REC", "C:\REC_" & [m-th] & ".xlsx", True

    I'm running the code which is behind the button on the continuous form with checkboxes. Checking checkboxes update the query which I'm trying to export.
    How to export the query while I'm in the open form. Is that a problem?
    Could you please help....

    s

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    What happens if you run yhe query qry_rec from the query navigation pane
    that error message suggests that either you have mistyped a column in the query or a column has bedn renamed or deleted in the underlying table
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Apr 2015
    Posts
    4
    the query runs from the navigation panel.
    The problem appears when runinng the code....

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    So what does [m-th] represent and what value does it have when the error is reported?
    Its possible that by using a reserved symbol, a hyphen, that may cause odd errors.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •