Results 1 to 3 of 3
  1. #1
    mizzkk is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Dec 2013
    Location
    Quebec,CA
    Posts
    2

    mismatch problem

    Hi all, my very first db..grovel, grovel, I hope that my question is coherent enough and not too stupid.




    I have an Employee table. Each employee has 3 different billing rates named Rate1, Rate2 and Rate3. Which rate they use depends on the project they will be inputting hours for.
    So I have a Project table which has an ID, Description and a BillingRate (Rate1, Rate2 or Rate3)
    How do I set that up so that I can query for EmployeeName, ProjectID or description and the appropriate rate to create invoices?
    In other words how do I get around the mismatch problem BillingRate being text and Rate1, Rate2 and Rate3 being numbers?
    Is there a way to create criteria that compares a field name to a field value?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    The Employee table has the 3 numeric rate fields?

    In query that joins Project and Employee tables, create a field with an expression:

    Switch([BillingRate]="Rate1", [Rate1], [BillingRate]="Rate2", [Rate2], [BillingRate]="Rate3", [Rate3])

    or

    Choose(Right([BillingRate],1), [Rate1], [Rate2], [Rate3])


    If BillingRate were a number field with values of 1, 2, 3:

    Choose([BillingRate], [Rate1], [Rate2], [Rate3])
    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.

  3. #3
    mizzkk is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Dec 2013
    Location
    Quebec,CA
    Posts
    2
    Super, thanks!

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

Similar Threads

  1. Replies: 6
    Last Post: 11-16-2013, 06:06 PM
  2. Look up relationship mismatch
    By char in forum Access
    Replies: 6
    Last Post: 10-30-2012, 04:25 PM
  3. Type Mismatch....WHY?!!?
    By jgelpi16 in forum Queries
    Replies: 9
    Last Post: 03-07-2011, 09:18 AM
  4. Type mismatch
    By jgelpi16 in forum Programming
    Replies: 1
    Last Post: 08-07-2010, 06:54 AM
  5. Data Mismatch?
    By Lockrin in forum Access
    Replies: 7
    Last Post: 06-14-2010, 03:17 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