MS Access Change textbox format from Fixed number to straight text
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: MS Access Change textbox format from Fixed number to straight text

  1. #1
    Join Date
    Sep 2013
    Posts
    1

    MS Access Change textbox format from Fixed number to straight text

    I want to resue a control on a form, and change the data in it from a fixed number with 2 decimals to text and back depending on which datasource I am pulling.
    The issue I am having is that when I put in straight text - there is a # in the text and in truncates the rest of the string after the #.

    I tried to make a custom format me.txt00.Format = "@ " and I am still getting truncated data.

    How do I tell the control that it is not a number format or a date format so it stops truncating the text after the #.

    I simply made a new control and didn't format it as a number and the data shows up fine.
    So how can I go back and forth using the same control?

    Will it break on me later if I just use my new control?

    Any thoughts or directions would be greatly appreciated.

    Aazzner

  2. #2
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,845

    Re: MS Access Change textbox format from Fixed number to straight text

    Can the format property be set at run time?

    I do not code in Access, in VB6 this is simple there is no Format on the textbox. Textboxes display text and there is a Format() function which can format text the way you want through code.
    I am not sure that Format() function exists in Access VBA
    Always use [code][/code] tags when posting code.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center