Results 1 to 2 of 2
  1. #1
    dumastro is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2013
    Posts
    1

    Query only works on one of two identical tables

    I have two databases (2013 and 2014) which are identical - all objects (tables, queries, reports etc) from 2013 copied to a blank db. I then deleted al the data from the Expenses table, entered new data in the Expenses table and renamed the db 2014. The rest of the tables remained unchanged.
    I have a Select query which prompts for two required months, calculates the VAT amount for each purchase and then gives a monthly summary of the total purchases and VAT amounts paid at the different VAT rates for each respective month. The query works fine in the 2013 db but in 2014 db it returns "The expression is typed incorrectly, or is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables." The culprit I assume is the expression "Vat Amount: Sum(CCur([Expenses].[Amount]*[Expenses].[VAT%]/100))". The only other expression is "Month: Format$([Date],"mmm",0,0)" requesting the input of the two relevant months. Both were copied several times for the 2013 db to the 2014 db with the same result.
    Vista 32bit
    Office Pro 2007
    I even appended the 2014 table's data to the 2013 table which then make the 2013 db returning the same error message as well. I thus assume the problem must be in the 2014 Expenses table but I don't know how to find it. Even in design view the two tables are the same.


    Only object dependencies differ but I don't know how to change it.

  2. #2
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742

    Check References

    The first thing to check is the references (in Access 2003, from the VB Editor > Tools > References) that are checked in the "2013" database, then see if any of those same references are not checked, or marked "missing" in the "2014" database. From the clone method you described, that can happen.

    Please report back and tell us if if that was the problem, and if so then mark the thread closed. Otherwise, we'll give you more things to look at.

    Something is tickling the back of my head about the old $ functions (Format$). I've forgotten which ones are now deprecated ...

    NOTE - Calling the databases by year names in this forum might confuse folks as to which version of Access you are on. Luckily, there isn't a 2014 yet, so I'm assuming Access 2007.

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

Similar Threads

  1. Replies: 3
    Last Post: 04-05-2013, 10:40 PM
  2. Active & Archive Tables Identical but Different?
    By Instructor Support in forum Database Design
    Replies: 1
    Last Post: 08-17-2012, 12:27 AM
  3. Identical tables for different user data.
    By Bajaz001 in forum Forms
    Replies: 1
    Last Post: 03-15-2011, 10:37 PM
  4. Replies: 3
    Last Post: 12-10-2009, 02:16 PM
  5. Difference between 2 identical tables.
    By leepan2008 in forum Access
    Replies: 1
    Last Post: 09-28-2009, 07:36 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