Results 1 to 7 of 7
  1. #1
    Roza is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    3

    Visitors signing in and out DB

    Hi


    I'm working on DB of visitors, I need only one table contains user ID, ID number, ID type, visitor name, sign in time, sign out time, company name, Date, and serial No.

    I designed a form that allow me to create new field and save the data, the issue that I'm facing is that, when I save the new visitors details, I need to retrieve a visitors detaile based on the user ID that I will enter, and only search ob the records that have been entered today, then I will add the time that the visitor is leaving the company

    As tomorrow I will be using the same users id's


    User ID is a badge that given to visitors in order to open all doors,

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,451
    something like

    select * from usertable where id=[enter id] and SignInDate=Date()

    I note you have a number of field names which are potentially access reserved words. Even though you may be using square brackets this can still confuse access. These are number, name, time and date. Change the name of your date field and remove spaces from the others

  3. #3
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,836
    Roza, do you care if a log/sign out was not performed for some reason? Maybe the db was not available in the latter part of one day and on the next day you wanted to finalize these records from a log book. If so, you will need to retrieve records where SignOut was Null (notice I'm supporting Ajax's suggestion that you need to read up on reserved words): http://allenbrowne.com/AppIssueBadWord.html

    In that case, it might be SELECT * FROM usertable WHERE id=[enter id] AND SignOut = Null
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Roza is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    3
    Quote Originally Posted by Ajax View Post
    something like

    select * from usertable where id=[enter id] and SignInDate=Date()

    I note you have a number of field names which are potentially access reserved words. Even though you may be using square brackets this can still confuse access. These are number, name, time and date. Change the name of your date field and remove spaces from the others
    Thanks for your reply
    I'm not expert in Access ^_^ so can you tell me where should I type this SELECT command??

    and regarding the reserved field names, yes I am aware of that as I am using two languages in naming the fields , so I am using Date then the date in other language ..


    thank you again

  5. #5
    Roza is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    3
    Quote Originally Posted by Micron View Post
    Roza, do you care if a log/sign out was not performed for some reason? Maybe the db was not available in the latter part of one day and on the next day you wanted to finalize these records from a log book. If so, you will need to retrieve records where SignOut was Null (notice I'm supporting Ajax's suggestion that you need to read up on reserved words): http://allenbrowne.com/AppIssueBadWord.html

    In that case, it might be SELECT * FROM usertable WHERE id=[enter id] AND SignOut = Null

    Thanks for your help,

    in signing in and out is important for me, and I need to retrieve the records only for today to type when the visitor left the company,

    by end of the day I will save data that I have entered today as a report

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,451
    can you tell me where should I type this SELECT command
    depends, but typically in a query or a recordsource to a form or report. You can replace [Enter Date] with a reference to a control in a form

    so I am using Date
    OK but this means you would have an expression of say Date=Date - which will always be true

  7. #7
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,836
    Quote Originally Posted by Roza View Post
    Thanks for your help,
    in signing in and out is important for me, and I need to retrieve the records only for today to type when the visitor left the company,
    by end of the day I will save data that I have entered today as a report
    OK, I was thinking that if for any reason you could not get into the db at the end of the day (like power was out or database was broken) the next day you would not be sign out those who didn't get done the day before.

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

Similar Threads

  1. Replies: 2
    Last Post: 07-16-2015, 12:26 PM
  2. Signing in
    By ictcrystal in forum Forms
    Replies: 6
    Last Post: 04-03-2015, 04:10 PM
  3. Signing an Access Database
    By mmcgrath in forum Access
    Replies: 4
    Last Post: 07-18-2012, 12:46 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