+ Reply to Thread
Results 1 to 4 of 4

VBA Question

  1. #1
    Registered User
    Join Date
    03-16-2004
    Posts
    65

    VBA Question

    I am making a UserForm that I would like to have people accessing only enter dates into a certain field. Also I have one part of the form that asks for a user ID and I would like the person to enter a user ID with no more and no less than 7 digits and they all must be numbers.

    So my question would be... Is it possible to have these "text boxes" accept dates only and specifics such as 7 digits all numbers.

    Thanks in advance,
    TyeJae

  2. #2
    Registered User
    Join Date
    04-05-2005
    Posts
    15

    Userform

    Hi TyeJae

    Not sure if you have resolved this

    But there is a maxlength setting on the text field properties

    I can't find one to pre set a text box to a date field (unlike Access), so I would use VBA validation on the AfterUpdate event...... I usually validate my dates to throw up an error if date entered is over or under a year old (from current date) as this stops input errors, but I'm not sure if this fits in with your data.

    Badger

  3. #3
    Registered User
    Join Date
    03-16-2004
    Posts
    65
    Yeah I have used the maxlength option, but there is not minlength. So I was wondering if there was a formula that when "button_enter" is pressed if "input_ID" length did not equal 7 then a message would pop up to say "Invalid User ID". I don't know if it's possible, but the same would be true for entering a date.

    TyeJae

  4. #4
    Registered User
    Join Date
    03-16-2004
    Posts
    65
    Hmmm I guess not...oh well.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1