Results 1 to 7 of 7
  1. #1
    Biged5oh is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Dec 2018
    Posts
    9

    Now() value as a parameter in a query


    Hoping for some help on this road block.
    I have a form where users select data from pull down menus.
    I have a button that will record the entry and open a report based on the information made in the entry. The report is based on a query ( that is based on the form entry data)
    What I am trying to address is if multiple users log in at the same time, how can i make sure the report will give each user their specific report?

    I have tried to stamp each entry with the Now() function, and have the query based on that parameter, but I keep getting and Enter Parameter Value error even though I see the time stamp is included in the record.

    Thanks in advanced for any help!

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    If you track the date and time the entry was made why not simply track who made the entry - many different ways to do this - logged on user if you use an Access login process, system username from Environ("username"), etc. So in your table add a field called CreatedBy, populate it when the entry is made (usually in the BeforeInsert event of the form) then use that in the query that feeds the report. Hopefully your db is split and each user has their own front-end.

    Cheers,
    Vlad

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    NOW never needs a param. There must be another reason.
    a typo in other criteria, missing object on form,...
    In a report, its an invalid group sort.

    can we see the sql?

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    As Vlad said "Hopefully your db is split and each user has their own front-end.".
    You should have a back end (BE) that contains only the tables and a front end (FE) that contains all other objects.
    The BE should be in a common accessible location and each user should have a copy of the FE on their own computer.

    If you do not have a split database and have multiple users, this is a sure method to corrupt your dB!

    If you have a split dB, and you make changes to the forms/reports/code, it is easy to give the users a new FE - you don't have to worry about transferring or losing the data (tables).

    And if each user has a copy of the FE on their own computer, you don't have to worry about how to make sure a report will give each user their specific report data.

  5. #5
    Biged5oh is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Dec 2018
    Posts
    9
    Thanks for the ideas everyone! Thats what I love about these forums, they give you a new perspective on how to approach an issue. SO i've spent the week learning how to establish a login system. My next question is, how do I pull the login info onto the entry?

    BTW, yes I do plan to offer the datasystem via a split DB.

  6. #6
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    You can save the user in a local "settings" table, a global variable or in a tempvar.

  7. #7
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Quote Originally Posted by Gicu View Post
    You can save the user in a local "settings" table, a global variable or in a tempvar.
    Or you could keep the login form open (but hidden) and simply reference the textbox that holds the user name.

    Cheers,
    Vlad

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

Similar Threads

  1. Replies: 2
    Last Post: 01-26-2017, 08:19 AM
  2. Replies: 1
    Last Post: 07-21-2015, 03:38 PM
  3. Replies: 1
    Last Post: 02-28-2013, 01:20 PM
  4. Replies: 3
    Last Post: 08-16-2012, 03:02 PM
  5. Replies: 13
    Last Post: 01-10-2012, 09:56 AM

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