Page 3 of 3 FirstFirst 123
Results 31 to 32 of 32
  1. #31
    data808 is offline Noob
    Windows 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    727
    Hey robrich22,



    thanks for the reply and help once again. Would you be able to specify which book I should get? Right now I have Win7 running MS Office 2007. I'm thinking of getting a new laptop that may or may not have Win 8.1 with either 2010 or 2013 but not sure yet. I also may just continue using Office 2007 but with that in mind, is there a book you can recommend for a beginner like myself?

    Let's see if I understand what you mean. So you want me to call this procedure after the user logs in? Does that mean I can apply that code to the screen that opens on a successful login such as the main menu on the "On Open" event? Or did you mean to apply the code in the same Login Click event thats listed above?

    You also mentioned about recording a 1 for true and 0 for false. Do I add that to your code? Sorry I have no idea what your code is trying to do. I can see that its going to enter the date and time into [LoginDate] and [LoginTime]. Then is Application.currentUser a built in function in access to know which user is logged in? I would think that this data would need to be transferred from the txtUsername text box from the login screen which I found a way to do it without the login form staying open visually. What I do is I open the login form in acHidden view on a successful login using the "On Open" event from the screen that loads after the login. This makes the login form disappear from view but its still there to retrieve the Username from it.

  2. #32
    robrich22's Avatar
    robrich22 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2013
    Location
    Louisville, KY
    Posts
    41
    Quote Originally Posted by data808 View Post
    Hey robrich22,

    thanks for the reply and help once again. Would you be able to specify which book I should get? Right now I have Win7 running MS Office 2007. I'm thinking of getting a new laptop that may or may not have Win 8.1 with either 2010 or 2013 but not sure yet. I also may just continue using Office 2007 but with that in mind, is there a book you can recommend for a beginner like myself?
    I'm not sure about books.. Just check the reviews on Amazon. I have bought so many books over the years. Unless you have alot of money then buy used on Amazon, they almost always still look brand new. Programming Books can get expensive.

    Office 2007 is fine but I personally like to keep up with new technology so I mostly use 2013. I have all versions dating back to 2000. Well actually I don't have Office XP, I lost the disk somewhere.
    Let's see if I understand what you mean. So you want me to call this procedure after the user logs in? Does that mean I can apply that code to the screen that opens on a successful login such as the main menu on the "On Open" event? Or did you mean to apply the code in the same Login Click event thats listed above?

    You also mentioned about recording a 1 for true and 0 for false. Do I add that to your code? Sorry I have no idea what your code is trying to do. I can see that its going to enter the date and time into [LoginDate] and [LoginTime]. Then is Application.currentUser a built in function in access to know which user is logged in? I would think that this data would need to be transferred from the txtUsername text box from the login screen which I found a way to do it without the login form staying open visually. What I do is I open the login form in acHidden view on a successful login using the "On Open" event from the screen that loads after the login. This makes the login form disappear from view but its still there to retrieve the Username from it.
    Call the procedure after you verify the users credentials, before you open the main menu. So if it is a successful login
    RecordLogin(inUsername, 1)
    Unsuccessful
    RecordLogin(inUsername, 0)

    I'm using 1 as true, and 0 as false. You could make the field a yes/no field and just set true/false if you want instead of the integer.
    RecordLogin(inUsername, true)

    You can record whatever username you want. The name the user enters into the database. Application.CurrentUser is the user thats logged into the application if you have the user accounts feature setup.. (which I'v never used, so I can't tell you about it).

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Web login form
    By drunkenneo in forum Programming
    Replies: 0
    Last Post: 10-09-2013, 12:14 AM
  2. Problem with User Login and Password
    By sk88 in forum Access
    Replies: 3
    Last Post: 12-16-2011, 08:11 AM
  3. Replies: 1
    Last Post: 12-11-2011, 11:48 AM
  4. Login form with nt login
    By hitesh_asrani_j in forum Forms
    Replies: 6
    Last Post: 09-22-2011, 11:43 AM
  5. Login to a form?
    By tandkb in forum Forms
    Replies: 0
    Last Post: 04-25-2011, 06:05 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