Results 1 to 6 of 6
  1. #1
    khparhami is offline Novice
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    2

    New insert row

    Dear friends,
    I have a table with columns of type text , when I insert a new row manually and set the value of one cell to for example "2010/02/09" it changes it to "20100209" when I read the values.



    do you have any idea what the problem is?

    thanx

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are you sure the field is a Text field and not a Number field?

  3. #3
    khparhami is offline Novice
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    2
    Yes I am , the field type is text with the input mask of "9999/99/99;;_" so when you want to fill one cell directly in access you have to fill this format : "____/__/__" it looks nice after filling but when you want to sort it you will find out that it is turned to "99999999" !

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    As you have discovered the mask does not change what is stored.

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    There is a possible solution here but I need to study up on masks first. I don't personally use them. More tomorrow.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    From Access 2007 Help:
    The three parts of an input mask

    Input masks are made up one mandatory part and two optional parts, and each part is separated by a semicolon. The purpose of each part is as follows:
    • The first part is mandatory. It includes the mask characters or string (series of characters) along with placeholders and literal data such as, parentheses, periods, and hypens.
    • The second part is optional and refers to the embedded mask characters and how they are stored within the field. If the second part is set to 0, the characters are stored with the data, and if it is set to 1, the characters are only displayed and not stored. Setting the second part to 1 can save database storage space.
    • The third part of the input mask is also optional and indicates a single character or space that is used as a placeholder. By default, Access uses the underscore (_). If you want to use another character, enter it in the third part of your mask.
    For example, this is an input mask for a telephone numbers in the U.S. format: (999) 000-000;0;-:
    • The mask uses two placeholder characters, 9 and 0. The 9 indicates an optional digit (which makes it optional to enter an area code), and each 0 indicates a mandatory digit.
    • The 0 in the second part of the input mask indicates that the mask characters will be stored along with the data.
    • The third part of the input mask specifies that a hyphen (-) instead of the underscore (_) is to be used as the placeholder character.

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

Similar Threads

  1. INSERT query: insert new data only
    By drh in forum Access
    Replies: 2
    Last Post: 04-04-2014, 05:31 PM
  2. SQL Insert into
    By jamin14 in forum Programming
    Replies: 15
    Last Post: 04-01-2010, 12:35 AM
  3. Stumped on an INSERT
    By Elisa in forum Programming
    Replies: 1
    Last Post: 12-26-2009, 10:49 AM
  4. Just insert new data
    By watzmann in forum Access
    Replies: 1
    Last Post: 11-29-2009, 11:48 AM
  5. help with insert
    By jamie in forum Access
    Replies: 1
    Last Post: 11-16-2009, 06:02 AM

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