Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    baksg1995 is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2009
    Posts
    11

    Input Mask for an IP Address and Mack Address

    Good afternoon
    I have a database that I am creating and I have been trying to use an input mask on two different fields and am having a difficult time getting the mask to work as I would like. The first field is chrIPAddress - a filed which I will collet the IP Address for each PC within the Data Center. The IP Address could look like 10.1.28.22 to 155.108.153.210 - 4 sets of digits containing from 1 to 3 digits per set of digits. I want to be able to remove the spaces and show the 3 digits to 1 digit in between the periods as in 10.1.28.22 not _10.__1._28._22.
    I also have a MAC Address I'm trying to collect in the database which is 6 sets of 2 Alphanumeric characters seperated by period,
    as in 00-1E-37-3E-2F-9E. Letters will be capitalized
    I want to show the periods in display but not store them. It must not allow duplicates but allow a blank field, Required entry = No, I want to allow zero - length(meaning I want to allow for blanks).



    Can anyone help me with this input mask, I've tried to mix in optional characters and required but I just don't seem to be getting the right combination.

    Kevin G

  2. #2
    baksg1995 is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2009
    Posts
    11

    Input Mask for an IP Address and Mack Address

    I am doing all of this using Microsoft Access 2003 Version 11.0 on a Windows CXP Environment.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What is Windows CXP?

  4. #4
    baksg1995 is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2009
    Posts
    11
    Sorry about that - I fat fingered the C when hitting the X in Windows XP.

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by baksg1995 View Post
    Sorry about that - I fat fingered the C when hitting the X in Windows XP.
    I'm guilty of that all of the time but I thought MS had another OS I didn't know about. Thanks. I'm still thinking about your issue.

  6. #6
    baksg1995 is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2009
    Posts
    11

    Input Mask for an IP Address and MAC Address

    RuralGuy
    Thanks - I figured out the MAC address - or it seems to work well

    !>AA\-AA\-AA\-AA\-AA\-AA;;_
    6 sets of two digits or a digit and a letter or 2 letters in a set.
    I want to capitalize the letters.

    Question: Is the ! (Exclamation Point) needed?
    Does it help in this situation or not affect it at all?
    Thats filling the entry from right to left correct?
    baksg1995

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'm not real big on input masks, which is why I'm still thinking about it. You may want to test the ">" at the beginning. I think it changes the display of the character but not the character itself. So if "a" was entered then "A" is displayed but "a" is stored in the field. As for the "!", I don't know, sorry.

  8. #8
    baksg1995 is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2009
    Posts
    11
    RG

    If I create a form or a report will the characters displayed always be displayed as capitalized. If the printed report is going to always show as capitalized does it really matter how it's stored? I'm just concerned with the displayed aspect of the text at this time. Will storing the character as a lowercase letter cause any issues?

    baksg1995

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I would store them as Uppercase to eliminate any issue down the road. UCase() should so it.

  10. #10
    baksg1995 is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2009
    Posts
    11
    Add that to my input mask? At the end seperated by a ;
    as in >AA\-AA\-AA\-AA\-AA\-AA;;_;UCase()

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Actually I think you would need to put it in the KeyDown or KeyPress event now that I think about it. You would need to turn KeyPreview ON for the form.

  12. #12
    baksg1995 is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2009
    Posts
    11
    At this time I haven't created the form yet - still nailing down the tables, lookup wizards and such. That will be something I can address once I start creating the form and the basic report. I'll save the advise for that time -

    If your not a big fan of input masks how do you normally go about forcing people to enter data the same way consistently?

    I do believe that if I use formatting it affects forms and reports but an input mask is the best way to make consistently uniformed data entries.
    Is this a rookie misconception (not really a rookie - I've created usable databases for years now but definately learning as I go forward.

  13. #13
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I definitely verify my input, usually in the BeforeUpdate event of the control on the form. An input mask might be the best in this case. Please do not use Lookup Fields in your design.

  14. #14
    baksg1995 is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2009
    Posts
    11
    RG

    Am I glad I'm talking to you now instead of a month down the road and I've already created the tables and forms. Ok so if I create a table containing all of the Work groups within a data center would that do the trick?

  15. #15
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You can use ComboBoxes on forms to do Lookup's for you, just don't use them at the table level.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Input mask
    By doobybug in forum Access
    Replies: 2
    Last Post: 06-17-2009, 09:40 PM
  2. Replies: 1
    Last Post: 05-01-2009, 07:33 AM
  3. Input limits
    By Hannu in forum Access
    Replies: 0
    Last Post: 08-31-2008, 03:02 AM
  4. Textbox will not allow input
    By cwf in forum Forms
    Replies: 0
    Last Post: 04-04-2008, 04:08 PM
  5. Import Lotus Notes address book into a MS Access table.
    By acheo in forum Import/Export Data
    Replies: 0
    Last Post: 02-19-2007, 02:43 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