Results 1 to 8 of 8
  1. #1
    koncreat is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2015
    Location
    U.S.
    Posts
    43

    update query error

    I have information from two tables that i need to append into one table to create the report. So I created a make table query to create the table i will use to append the data to. That worked with no issue. So now i have two queries that i need to run after a user enters the start and end dates and the data update the table. When i originally did this the query was an append query and ran successfully but the second query would delete the data the first query appended to the table. I realized then that it would need to be an update query and not an append query. The problem that i have run into is after making the query an update query i am getting an error. I have three fields that break down the date to month, day and year. The field for month is Month:Month([Date_Entered]). The error:



    Month:Month([Date_Entered]) is not a valid name. Make sure that it does not include invalid characters or punctuation and that is not too long.

    Since this works if the query is an append query I'm not sure what is wrong.

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Month is a reserved word, try changing the name of the field to something else and see if this solves the problem.

    Post the full SQL.

  3. #3
    koncreat is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2015
    Location
    U.S.
    Posts
    43
    I changed it to month and stll get the error. I tried to switch to SQL view but i cant because i get the error

  4. #4
    koncreat is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2015
    Location
    U.S.
    Posts
    43
    Month([Date_Entered]) This appears to be the problem as it keeps pointing to this.

  5. #5
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    I changed it to month
    It was already set to "Month"!

    Remove that field, then it will allow you to get the SQL.

  6. #6
    koncreat is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2015
    Location
    U.S.
    Posts
    43
    Sorry i meant changed it to Mon, same error. Removed it all together and now getting the error for the Dayay([Date_Entered]) field

  7. #7
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    So the problem lies with Date_Entered. Is it from a table or are you trying to get prompted for it?

  8. #8
    koncreat is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2015
    Location
    U.S.
    Posts
    43
    At first i wanted to be prompted for a date range but have since removed it just to see if that was the problem.

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

Similar Threads

  1. Update query rules error
    By Jen0dorf in forum Access
    Replies: 2
    Last Post: 03-08-2016, 09:36 AM
  2. Update query error
    By msaccessdev in forum Access
    Replies: 1
    Last Post: 06-06-2014, 06:08 AM
  3. Update query Error
    By rd.prasanna in forum Queries
    Replies: 1
    Last Post: 10-04-2013, 03:01 AM
  4. Update query error
    By dccjr in forum Queries
    Replies: 6
    Last Post: 05-21-2013, 08:06 PM
  5. Syntax Error 3144 in SQL Update Query.
    By Phred in forum Programming
    Replies: 4
    Last Post: 03-02-2012, 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