Results 1 to 8 of 8
  1. #1
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199

    Default in Textbox

    I have a text box in Form which i need use should only enter the numbers:



    for eg:
    When new form appears SI [space]#### should be there and even user needs he or she can change SI to PI and enter the required data.

    And the data should go as SI #### or PI #### in Table Backend. The Textbox is Unbound.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Why don't you have this in two fields?

    Maybe use input mask?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199
    In input mask i can get success of either SI or PI but not on both. Means when i apply "SI " 9999 its limited only for SI and PI cant be typed.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Try: L"I "9999;0;_
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199
    Indeed, but this list have IC and LH Also..

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Then better to use two fields and two controls. The letter part can be selected by combobox. The number part can be input mask in a textbox. If really must be one field, use code to concatenate values of the two controls.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by drunkenneo View Post
    Indeed, but this list have IC and LH Also..
    Also, it would be better if you gave us all pertinent data in your original post, rather than making us provide an answer for one scenario, then having it changed to another scenario, and so forth! Don't post

    '...the data should go as SI #### or PI #### in Table Backend...'

    when the reality is

    '...the data should go as SI #### or PI #### or IC #### or LH #### in Table Backend...'


    I agree with June7; you need to store this in two different Fields. You can always concatenate them for display purposes.

    Linq ;0)>

  8. #8
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199
    I have worked it out with two different Fields.

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

Similar Threads

  1. Replies: 3
    Last Post: 06-14-2013, 01:50 PM
  2. Replies: 2
    Last Post: 04-20-2013, 03:37 AM
  3. Replies: 8
    Last Post: 04-12-2013, 08:59 PM
  4. Textbox default value with datetimeyear
    By Perkowski in forum Access
    Replies: 8
    Last Post: 08-09-2012, 01:37 PM
  5. Replies: 2
    Last Post: 08-06-2011, 12:19 PM

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