Consulting

Results 1 to 2 of 2

Thread: Crosstab Query Problem after Conversion from Access 2003 to 2016

  1. #1

    Crosstab Query Problem after Conversion from Access 2003 to 2016

    Hi,
    I have a client who has just converted an old Access 2003 database to Access 2016. Most of it is working fine. However, he has a report that is based on a table that contains fields named "Month1", "Month2", etc. up to "Month12". These fields are populated in VBA by an append query. The source of the append is a crosstab query with dates as the columns. The SQL is something like "INSERT INTO tblRecordSource (Month1, Month2, Month3 ... ) SELECT [1/1/2010], [2/1/2010], [3/1/2010] ... FROM qryCrosstab"

    The problem is that Access is telling us it does not recognize [1/1/2010] as a field name. Apparently it used to in Access 2003.

    Would it work if the field name from the crosstab query was [1-1-2010]? What else might I be missing?

    Thanks for your help!
    Evan

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,029
    Location
    I normally provide the month instead of the date for that kind of operation by using Format([datefield],"MM") or the datepart function.

Posting Permissions

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