Results 1 to 7 of 7
  1. #1
    darwin is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    28

    how to place a multiply in a query

    I have this statement but get error for the 1.5



    message about a bad syntax

    my statment is okay when not 1.5, so what do i wrong ?

    ([tblStamData]![Løn]*[tblBonus]![Overtid50Antal])+
    ([tblStamData]![Løn]*[1.5])+

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Why is 1.5 in []? Is 1.5 the value in Overtid50Antal field?
    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
    darwin is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    28
    about the [] that was last try, 1.5 is not the value in Overtid50Antal field?

    what I want is eg. 4 * 1.5 = 6
    the 4 come from the
    [tblStamData]![Løn]

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    If you want a literal value (1.5) and not a variable:

    [tblStamData]![Løn] * 1.5
    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.

  5. #5
    darwin is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    28
    I try this but still error

    . = , in europe

    IIf([tblStillingsbetegnelser]![Stillingsbetegnelser]="Test";
    ([tblStamData]![Løn]*[tblBonus]![Overtid50Antal])+([tblStamData]![Løn]*1,5)+
    ([tblStamData]![Løn]*[tblBonus]![Overtid100Antal])+
    [tblBonus]![Ekstra]); .................more

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    If that is part of a query, post the entire SQL statement.
    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.

  7. #7
    darwin is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    28
    Hi it look ok, maybe it was another issue in the statement, I just go back to original statement at replace it with 1,5 and now it is ok.

    Thanks very much for your help

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

Similar Threads

  1. Replies: 2
    Last Post: 08-16-2013, 01:36 AM
  2. Opening multiply Forms?
    By djclntn in forum Forms
    Replies: 10
    Last Post: 04-02-2013, 04:20 PM
  3. Replies: 7
    Last Post: 10-15-2012, 09:48 AM
  4. Replies: 3
    Last Post: 11-17-2010, 05:21 PM
  5. score and place query
    By ymds in forum Queries
    Replies: 1
    Last Post: 06-10-2010, 06:07 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