85% of value not working in report (1 Viewer)

access2010

Registered User.
Local time
Today, 14:48
Joined
Dec 26, 2009
Messages
1,021
Can I please receive a suggestion as to how we can receive a value of 85% of the cost and place the 85% value into the field Stop_Loss.

Your suggestion is appreciated.

Thank you
Marry Jane
 

Attachments

  • Stop_Loss_85prc.mdb
    204 KB · Views: 60

isladogs

MVP / VIP
Local time
Today, 22:48
Joined
Jan 14, 2017
Messages
18,209
See attached.
I've added a field Stop_Loss to the report record source with value 0.85*Cost and formatted it as currency.
 

Attachments

  • Stop_Loss_85prc_v2.mdb
    288 KB · Views: 56

access2010

Registered User.
Local time
Today, 14:48
Joined
Dec 26, 2009
Messages
1,021
Re: 85% of value not working in report = Long

Thank you for your assistance.
Your code suggestion works in 3 of our databases but not in the Ms Access 2003 database attached.
Could you please suggest a code to fix our 4th database.

Our next difficulty is to only list one stock code, instead of multiple listings of the same Stock Code.

Thank you,
Nicole
 

Attachments

  • Stop_Loss_85prc_Long.mdb
    256 KB · Views: 56

isladogs

MVP / VIP
Local time
Today, 22:48
Joined
Jan 14, 2017
Messages
18,209
Solution attached.
I created a query for the fields and the two calculated values.
For the Nz expressions, I explicitly added 0 for the null alternative rather than assume it.

Strongly recommend that field names do not contain special characters such as $ and # as these have other meanings in Access and can cause issues.

Two versions of report attached.
The second hides duplicates in the first column
 

Attachments

  • Stop_Loss_85prc_Long_v2.mdb
    392 KB · Views: 57

access2010

Registered User.
Local time
Today, 14:48
Joined
Dec 26, 2009
Messages
1,021
P E R F E C T.

Thank you for your assistance and our reports are producing the results we want.

Regards,
Mahi
 

Users who are viewing this thread

Top Bottom