Access Control Ignoring Format Assignment

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Donna A
    New Member
    • Jan 2007
    • 5

    #1

    Access Control Ignoring Format Assignment

    I am working in Access 2000. I have a form with a tab control with several pages, each one containing a form. The textboxes on these forms are not allowing me to set a format. When I click the Format in the properties there are no options. I tried typing in an appropriate format "Standard", and it does not work. I also tried forcing the format in the Control source property - =Format([Jan],"#,###") that did not work. Then I tried setting the format property using VB during the form load event, that also did not work. The formatting works fine in the footers where I have totals. Any idea? I am at a loss. Thanks,
    Donna
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Originally posted by Donna A
    I am working in Access 2000. I have a form with a tab control with several pages, each one containing a form. The textboxes on these forms are not allowing me to set a format. When I click the Format in the properties there are no options. I tried typing in an appropriate format "Standard", and it does not work. I also tried forcing the format in the Control source property - =Format([Jan],"#,###") that did not work. Then I tried setting the format property using VB during the form load event, that also did not work. The formatting works fine in the footers where I have totals. Any idea? I am at a loss. Thanks,
    Donna
    Assuming these are unbound text boxes you will need to set the datatype to number first before trying to set the format property.

    Mary

    Comment

    • Donna A
      New Member
      • Jan 2007
      • 5

      #3
      Originally posted by mmccarthy
      Assuming these are unbound text boxes you will need to set the datatype to number first before trying to set the format property.

      Mary
      The textboxes are bound, and the datatypes are numbers that go through a series of queries before ending up in my form, some of which are crosstabs...may be that has something to do with it? I will check.

      Comment

      • Donna A
        New Member
        • Jan 2007
        • 5

        #4
        Originally posted by Donna A
        The textboxes are bound, and the datatypes are numbers that go through a series of queries before ending up in my form, some of which are crosstabs...may be that has something to do with it? I will check.
        OK, looks like access stops recognizing the datatype once the data goes through an nz(). Any way to work around?

        Comment

        • MMcCarthy
          Recognized Expert MVP
          • Aug 2006
          • 14387

          #5
          Originally posted by Donna A
          OK, looks like access stops recognizing the datatype once the data goes through an nz(). Any way to work around?
          Are you putting in 0 for the default value of the nz().

          Post the code for this and we'll have a look.

          Mary

          Comment

          • Donna A
            New Member
            • Jan 2007
            • 5

            #6
            Originally posted by mmccarthy
            Are you putting in 0 for the default value of the nz().

            Post the code for this and we'll have a look.

            Mary
            Thanks Mary, but it looks like I found a fix...if I cast all as doubles Cdbl(nz()) it seems to work. Only problem is I have 16 queries X 12 months to edit. Actually that leads me to another question, I will post separately. Thanks again for your help.

            Comment

            Working...