Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Evansville, Indiana, USA
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    table properties (2000)

    I have a table that has two fileds that are numbers. If the number stored is an 8 for example, I want it to be stored as "08". Right now the zero is dropped off. How can I make it where the zero doesn't drop off?
    Thanks,

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: table properties (2000)

    Set the Format property to 00
    The value will still be stored as 8, but it will be displayed as 08.
    If you really need the leading zero to be stored, the field should be a text field, not a number field.

  3. #3
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Evansville, Indiana, USA
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: table properties (2000)

    I am using a DDE to get data from a Allen Bradley SLC 505. One field is hours and the other is minutes. When the time is 12:05 for example, i get two values from the PLC. The hours is 12 and the minutes 5. I don't care if it is stored as a 5 in the table. I need it to display as 05 when I generate the query and report. I use a query to search the table and combine the two fields together. When I view the query in datatable view, the hours displays 12 and the minutes 05 after I changed the format to 00. When I add "Timestamp: [hour] & ":" & [minute]" to one of the query items the time displays 12:5. Is there a way to display the zero in this case?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: table properties (2000)

    I have no idea who Allen Bradley is or what an SLC 205 or PLC is, but you can use

    TimeStamp: TimeSerial([Hour], [Minute], 0)

    and set the Format property of TimeStamp to hh:mm

  5. #5
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Evansville, Indiana, USA
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: table properties (2000)

    Thanks, that does what i need it to.

Posting Permissions

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