Results 1 to 5 of 5
  1. #1
    roxmyster is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2020
    Posts
    2

    How to have a currency value read as a number?

    I am trying to divide two fields, a currency with another numeric field, but access is giving me an error and I believe is due to the $ sign. How can I solve this issue. Thank you in advance

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    Show us the expression you are tying to use.
    What is the reported error.
    Where are you trying to do this.
    Can you give us an example of the math.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    roxmyster is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2020
    Posts
    2
    Thank you for you reply!

    The error I am getting is subqueries can’t be used in the expression kg_profit: IIf[chargeable weight] =0,0, [profit]/[chargeable weight].

    Before I had just kg_profit: [profit]/ [chargeable weight] and neither way works. It gives me the same error

  4. #4
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    Did you forget the parentheses in your code?
    Code:
    kg_profit: IIf([chargeable weight] =0,0, [profit]/[chargeable weight])

  5. #5
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    Quote Originally Posted by roxmyster View Post
    Thank you for you reply!

    The error I am getting is subqueries can’t be used in the expression kg_profit: IIf[chargeable weight] =0,0, [profit]/[chargeable weight].

    Before I had just kg_profit: [profit]/ [chargeable weight] and neither way works. It gives me the same error
    Can you post a copy of the db with just a couple of dummy records to show the problem
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 3
    Last Post: 11-23-2017, 02:14 PM
  2. Read Design & Read Data Issue
    By f15e in forum Access
    Replies: 7
    Last Post: 10-18-2016, 12:44 AM
  3. Replies: 5
    Last Post: 12-21-2013, 11:19 AM
  4. Replies: 2
    Last Post: 03-23-2011, 11:43 AM
  5. Replies: 2
    Last Post: 10-19-2006, 04:37 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