Results 1 to 6 of 6
  1. #1
    LucianoPena28 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Posts
    26

    Post Logging in Data into Tables matching ID number of another Table

    Hey,



    Hopefully you can understand my objective here, that is, to store data into this table called Computer Usage Log using a form.

    A sample table of the original table I've created to store the data

    LogID Logging_date ComputerID StudentID Check-in Check-out Reference Sheet
    1 22/01/2020 1 3317890 08:00 AM 08:50 AM 1
    2 22/01/2020 1 2191297 01:58 PM 02:52 PM 1


    On the Form I've created will be storing the information on the corresponding fields above, but as simple as it sounds it still has some complications.

    So far I've managed to let the form display all records that are existing at the time, but I can't add any new records. I created a relationship which I'm taking advantage of in the form, where from the StudentID, when data is being entered, the Student Name Field populates automatically from another table, which corresponds to that StudentID.

    Anyway I can accomplish this objective?

    Attached are some screenshots of what I've done so far.
    Attachment 40955Attachment 40956Attachment 40957Attachment 40958

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Luciano,

    I have looked at your database briefly. What exactly do you want to log(in plain English not database terms)? That will determine some of the relationships between your tables. How do computers get assigned to students?

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Have a look at the updated file. You might want to look at your tables, StudentID in Students should be unique (you have a duplicate student now), and you should avoid having spaces in the field and objects (tables, forms) names.

    Cheers,
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    Fixed some of Vlad's concerns with IDs. Established use of autonumber PK with FK for table relationships and referential integrity. Created Student form with tabs for the 2 logs.

    Library Computer and Study Room Management-davegri-v01.zip

    Click image for larger version. 

Name:	logs.png 
Views:	21 
Size:	37.5 KB 
ID:	40963

  5. #5
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    As mentioned by Vlad,
    Quote Originally Posted by Gicu View Post
    and you should avoid having spaces in the field and objects (tables, forms) names.
    Also should not use punctuation or special characters in object names.

    Check-in - has a dash in field name - should use underscore
    Reference_Sheet# - has a hash (#) in the field name.

  6. #6
    LucianoPena28 is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Posts
    26
    Thank you guys for all your help! Really appreciate it!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Retrieve Data from Table Matching Two Criteria
    By michaelb-201 in forum Access
    Replies: 0
    Last Post: 07-16-2019, 10:16 AM
  2. Replies: 7
    Last Post: 02-14-2017, 06:38 PM
  3. How to record time logs after logging in and logging out
    By annayanagi014 in forum Programming
    Replies: 1
    Last Post: 02-18-2015, 07:52 AM
  4. Replies: 3
    Last Post: 03-07-2014, 10:39 AM
  5. Report from a data logging table
    By chrismec in forum Reports
    Replies: 1
    Last Post: 02-29-2012, 01:03 PM

Tags for this Thread

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