Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2003
    Posts
    83

    Unanswered: Need help in setting up a default value for a field

    Good Morning,

    I am trying to set a default value for a text box to '01' in the properties of the textbox.

    But, no matter what I choose the datatype for the field, either 'Text' or 'Number' it keep changing to '1'. I even tried setting the default value by VBA, then also, it is changing to '1', and for my requirement, I need the zero as well in front of '1'.
    The VBA code I wrote as:

    Private Sub Form_Open(Cancel As Integer)
    txtClinicNum.DefaultValue = "01"
    End Sub


    How can I achieve this. any idea or help is greatly appreciated.
    Thanks.

  2. #2
    Join Date
    Jan 2004
    Location
    Kennesaw, Ga
    Posts
    20
    See if setting the Format to "Fixed" and the Default value to "="01"" works.

  3. #3
    Join Date
    Sep 2003
    Posts
    83

    Need help in setting up a default value

    Originally posted by agduga
    See if setting the Format to "Fixed" and the Default value to "="01"" works.
    Can you please let me know how to set the format to "Fixed", I am not sure about this.Do I have to do this through code?
    Thanks.

  4. #4
    Join Date
    Jan 2004
    Location
    Kennesaw, Ga
    Posts
    20

    Re: Need help in setting up a default value

    Originally posted by skodidhi
    Can you please let me know how to set the format to "Fixed", I am not sure about this.Do I have to do this through code?
    Thanks.
    I have access 2000 and if you right click on the textbox and go to the Format tab or the All tab, there is an item called format where you can select Fixed from the drop-down menu
    Attached Thumbnails Attached Thumbnails testbox format.gif  

  5. #5
    Join Date
    Sep 2003
    Posts
    83

    Re: Need help in setting up a default value

    Originally posted by agduga
    I have access 2000 and if you right click on the textbox and go to the Format tab or the All tab, there is an item called format where you can select Fixed from the drop-down menu
    Thanks a lot agduga !! it worked.

Posting Permissions

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