[AccessD] Unbound numeric textbox reverts to scientific notation

John W Colby jwcolby at gmail.com
Thu Sep 12 09:36:56 CDT 2013


IIRC Gustav knows how to do classes.

John W. Colby

Reality is what refuses to go away
when you do not believe in it

On 9/12/2013 9:11 AM, Heenan, Lambert wrote:
> I think the only way to handle this us to write your own Keyboard handler for textboxes event handler. It will be touch tedious as you will have to deal with editing keys that the user may need to move left and right in the textbox, delete etc. But it is doable. You can even make a class out of it and then be able to use it at will in any other textbox in any application.
>
> Calling John Colby!
>
> Lambert
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
> Sent: Wednesday, September 11, 2013 2:57 PM
> To: accessd at databaseadvisors.com
> Subject: Re: [AccessD] Unbound numeric textbox reverts to scientific notation
>
> Hi Charlotte
>
> OK, thanks. Then I guess there is no easy or elegant way to handle this.
>
> /gustav
>
>
>>>> charlotte.foust at gmail.com 11-09-13 20:07 >>>
> Ah, I missed the unbound part.  I've had similar experiences with unbound textboxes switching to scientific notation, and I believe I've resorted to using a string on the unbound box.
>
> Charlotte
>
>
> On Wed, Sep 11, 2013 at 11:02 AM, Gustav Brock <Gustav at cactus.dk> wrote:
>
>> Hi Charlotte
>>
>> No, if it is bound to a table with a field of data type Currency, it
>> would work.
>>
>> But this textbox is unbound.
>>
>> /gustav
>>
>>>>> charlotte.foust at gmail.com 11-09-13 19:53 >>>
>> Gustav,
>>
>> I suspect it is a precision issue.  Have you tried changing the
>> datatype to a double and using the format property to set the currency look?
>>
>> Charlotte
>>
>>
>> On Wed, Sep 11, 2013 at 12:31 AM, Gustav Brock <gustav at cactus.dk> wrote:
>>
>>> Hi Darryl
>>>
>>> Yes, that could work.
>>> Still, I find it strange that a value formatted as currency should
>>> appear in scientific notation - which is seen nowhere else.
>>>
>>> /gustav
>>>
>>> -----Oprindelig meddelelse-----
>>> Fra: accessd-bounces at databaseadvisors.com
>>> [mailto:accessd-bounces at databaseadvisors.com] På vegne af Darryl
>>> Collins
>>> Sendt: 11. september 2013 09:02
>>> Til: Access Developers discussion and problem solving
>>> Emne: Re: [AccessD] Unbound numeric textbox reverts to scientific
>>> notation
>>>
>>> One possible solution would be enter the 'number' as a string/text
>>> in the form and convert it back to a numeric format upon save/write
>>> to the data table.  That would work, but also introduces some risks
>>> you would have to handle.
>>>
>>> Cheers
>>> Darryl
>>>
>>> -----Original Message-----
>>> From: accessd-bounces at databaseadvisors.com
>>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav
>>> Brock
>>> Sent: Wednesday, 11 September 2013 4:48 PM
>>> To: 'Access Developers discussion and problem solving'
>>> Subject: Re: [AccessD] Unbound numeric textbox reverts to scientific
>>> notation
>>>
>>> Hi all
>>>
>>> So no solution or workaround to this?
>>>
>>> /gustav
>>>
>>> -----Oprindelig meddelelse-----
>>> Fra: accessd-bounces at databaseadvisors.com
>>> [mailto:accessd-bounces at databaseadvisors.com] På vegne af Gustav
>>> Brock
>>> Sendt: 4. september 2013 09:39
>>> Til: 'Access Developers discussion and problem solving'
>>> Emne: [AccessD] Unbound numeric textbox reverts to scientific
>>> notation
>>>
>>> Hi all
>>>
>>> I noticed this question on Experts-Exchange but found, that I can't
>>> figure it out:
>>>
>>> I have an unbound form. One text box is for currency data (euros)
>>> which is great provided the user only uses up to 11 digits.
>>> Now, the limit for currency values is 922,337,203,685,477 i.e.
>>> fifteen digits, but as soon as a user enters more than 11 digits and
>>> moves the focus away from the field and then back, the text box
>>> reverts to scientific notation.
>>> <snip>
>>>
>>> I can replicate this but found that it is not related to neither
>>> Euro nor Currency; as soon as you apply some numeric format, you'll
>>> see this behaviour.
>>> Is there any way around it?
>>>
>>> I've only tested with A2010.
>>>
>>> /gustav
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



More information about the AccessD mailing list