+ Reply to Thread
Results 1 to 1 of 1

VBA Login Form and TexBox Validation

  1. #1
    Registered User
    Join Date
    09-14-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    1

    Lightbulb VBA Login Form and TexBox Validation

    Hi all,

    I am interested in learning VBA and have set myself a small assignment. But i am facing a problem and will be glad if any one of you be of some assistance.

    My idea is to fetch data from database based on a given table name. While connecting, in order to make the program more interactive i thought of adding a Login Form for User. One of the Worksheets will have a button for FetchData operation and on button click, i will load a user form which will accept details from User. I am well set till entering and collecting data but i am having trouble validating the data entered in Text Boxes. My requirement is not to have User_Name and Password section empty.

    Here is my skeletal code :

    In worksheet Module :
    Please Login or Register  to view this content.
    In Form Module
    Please Login or Register  to view this content.
    Here after entering the details in the shown Login Form , TextBox validations should happen after i click submit button. If the textboxe/s are empty a smg should pop asking to fill the required fields and focus is to be set on that field.
    i gathered some info and came to know that there is some Me.Dirty operation to check for change in dta and a BeforeUpdate event on Form will trigger. But i am not able to get past this point. The Login Form should close only after all the required fileds are entered by user and i guess i can use cmd.close or unload options to get back to my worksheet modules.

    Please help me crack this code.

    TIA

    HarrY
    Last edited by Leith Ross; 09-14-2012 at 07:17 PM. Reason: Added Code Tags

+ 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