Results 1 to 3 of 3
  1. #1
    Sarahsedaii is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    1

    Transferring Padded Zeroes from Access Form to Access Table

    We use company numbers to identify what we are working on (example Claims, Inc. is 0100). We always use 4 digits, and sometimes they are padded with zeroes. When I am inputting new lines into the database via the form, I will type in the company number – 0095, but it is added to the table as 95. The table has this field formatted as a string. I can enter straight into the table with 0095, and it will hold. On the form the textbox converted to a string after the textbox is updated. Where am I going wrong?



    I even tried using a combo box with a query only having the correctly formatted company numbers, but it still gets added to the table without the padded zeroes.

    Thank you!

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    There is a difference between formatting and a field being defined as a text field.

    In design view of the table, is the field type "Text"?

    If it is, then there must be something about the text box. Is there any event code for the text box?

    Maybe delete the text box from the form, save the form and re-add the text box using "Add From Existing Fields" (in the Design menu). Re-name the text box by adding "txt" to the front of the name.

  3. #3
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    When I am inputting new lines into the database via the form, I will type in the company number – 0095, but it is added to the table as 95.
    Is your TextBox on your Form bound directly to the underlying Table field? It does not sound like it. What is the Control Source of the Text Box?
    How is the TextBox formatted?
    Is there VBA code or something else that writes the value from the Text Box to the underlying table?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 03-28-2014, 10:54 AM
  2. Replies: 6
    Last Post: 08-18-2013, 01:12 AM
  3. Transferring Excel Sheet To Access
    By athyeh in forum Access
    Replies: 22
    Last Post: 07-26-2013, 02:18 PM
  4. transferring data from word to access
    By RickScolaro in forum Access
    Replies: 6
    Last Post: 09-08-2011, 05:17 PM
  5. Replies: 2
    Last Post: 07-12-2010, 05:39 AM

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
  •  
Other Forums: Microsoft Office Forums