Results 1 to 4 of 4

Thread: Update table

  1. #1
    Join Date
    Feb 2005

    Unanswered: Update table

    I need help very badly!
    I have the problem that is called update a table from a table through a form.
    I have a table Users (fields: ID, UserName and Password.
    I want to keep records of all users that are Login in with their password's (as are on table Users) so i created an table UsersRecords (fields:ID"anutonumber", UserName, Date "Date default value" and Time "Time Default value" all those fileds will generate their records as soon as UserName get updated.
    This should work like this:
    I login In Login form that is takin records fromtable Users and onClose this form(Login) should update the UserName Field in UsersRecords table.
    I Was trying to use Update Query but or am making some mistake or this tool isnot the solution for this problem.

    I hope somebody will help me
    I thank you in Advance.

  2. #2
    Join Date
    Jul 2003
    It looks like you are trying to keep track of each time a user logs in.
    If so, you want to use "Insert Into" instead of "Update".
    Using an Update query will only show the users most recent activity,
    while an append query will add a new record each time the user logs in.
    Inspiration Through Fermentation

  3. #3
    Join Date
    Feb 2005

    More info

    Can I have more info regarding this option (Apend Query)?
    Tank you in Advance.

  4. #4
    Join Date
    Mar 2005

    Post Example

    You can use the following code to append a new record to your UserRecords table:

    docmd.RunSQL "INSERT INTO UserRecords (UserID, LogonTime, LogonDate) VALUES (" & Me.UserID & "," & Me.LogonTime & "," & Me.LogonDate & ")"


Posting Permissions

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