By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,472 Members | 2,195 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,472 IT Pros & Developers. It's quick & easy.

Access 2003 Question

P: n/a
I am developing a database to track day to day stock movements, because
I track a variety of stocks and all with different decimal places I
need to be able to update the price control on my form so that when I
view Yen information the control is set to 4 decimal places, but if the
information that comes through is the FTSE then the price control is
set to 0 decimal places.

I have tried to fix this as follows, I have a
Table Entity
Entity ID, Entity Name, Decimal
1, Yen, 4
2, FTSE, 0

When I load an Entity into a form I also load the decimal value in I
then use the following macro to change the value of the Price control
decimal poperty.

Action: SetValue
Item: [Open Price].[DecimalPlaces]
Expression: IIf([txtDecimal]="4",4,0)

I run this macro from the Afterupdate of the txtdecimal control.
this statement is just to test for 4 decimal, if I get this I will
update formula to test for other scenarios. This seems to work to some
extent, it will change the decimal value but over writes the decimal
values I have with all zeros for example if I type in 1.2456789 it will
convert to 1.0000

This is probably not the best way to go about it but its all I could
think of, if you have any better ideas would love to hear them or if
someone could help me get this way to work that would be excellent.

Thanking you

Cathal

Jan 16 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.