Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Number Format with MySQL Linked Table

Status
Not open for further replies.

mjd1947

IS-IT--Management
May 29, 2013
10
US
Hello.....I have a linked table through ODBC with a MySQL database. Any of the number fields are returned without the decimal place. For example 1,000.01 is stored in MySQL as 100001.

My question is what is the best approach to work with these values in Access Forms? If I do any conversion of the values in a query it makes the field not editable since it is based on an expression. Is there any way to simply display the field properly even though the user would have to enter data without the decimal?

Thanks in advance.
 
Hi,

You would display Value/100.

After the use enters a decimal like 100 or 100.1 or 100.11, store ThatValue*100 in your table.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Could you provide some direction on how this could be accomplished? The form is bound to a query which updates the record as soon as it is edited. Any way that I am aware of to 'display Value/100' would make the field based on an expression and therefore not able to be edited.
 
You would need an unbounded field to display:
[ThisField] = [FieldValue]/100

Then the user can enter some other value into [ThisField]. When the user is satisfied, hits a button and your code does
[FieldValue] = [ThisField]*100

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top