Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228

    Storing a click count?

    Basically I have some code that will print documents in a folder how I want them. It saves a lot of time as pages are set up differently. I wish to assign this code to a button that will look in a folder I define and then print.



    However; I wish to issue this to the staff here and take this part of the job totally away from myself. The problem is, I need them to know if it has been printed before and how many times.

    I'm guessing I can have a calculation on the print button and have it add 1 to the relevant field in the database; I just want confirmation I can do that or any ideas regarding the situation.

    Cheers.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    It sounds like you want logging. So, yeah, create a table to log events. A click event or whatever can add records to the log table. Log tables are usually considered as separate from the main DB. Meaning, you would not apply the typical Normalization Rules. Instead, the Log should stand on its own. In your case, some sort of hybrid may be suitable. It is hard to conceptualize without, first, living the experience. Basically, querying statistics is a pain. So, duplicate data in order to make it easier to query your log.

    Having said that, I usually delete reports after the PDF has been generated. I rarely find a reason to keep these things around. However, there are business rules that mandate they remain.

  3. #3
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    I do have a logging table for date changes, but these clicks are specific to an individual record.

    they will select which job they are working on. this is one individual record in the database. That record has its own location on our server for documents.

    Logging could work/be better as it would tell us a lot more. It could give details of who might have the needed docs etc. But say for example a field contains a numeric value. The button can just +1 and update a date field. That's not the same as a calculated field is it? I'm just assuming this would work I don't really know.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Well, you have to evaluate the business rules and see what process works. As I mentioned, some sort of hybrid might work best. You won't know until you try and fail. In other words, if you do not fail at least once, then you do not really know the answer.

    In the end, an additional column in the existing table that increments by one may be the answer. If this satisfies all of the rules, do that.

  5. #5
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Thanks, I was just concerned it was a calculated field but its not actually calculated each time I need to view it. Its just an update isn't it. It took me a while to understand.

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Yeah, just don't tell anyone it is a calculated field.

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

Similar Threads

  1. Replies: 2
    Last Post: 04-15-2014, 01:59 PM
  2. COUNT Group Count Records COUNT FUNCTION
    By PMCOFFEY in forum Access
    Replies: 9
    Last Post: 11-09-2012, 09:40 PM
  3. entering one value but storing another
    By greatfallz in forum Forms
    Replies: 1
    Last Post: 06-09-2011, 07:23 AM
  4. Help with end balance storing
    By Hulk in forum Database Design
    Replies: 6
    Last Post: 03-24-2011, 04:21 AM
  5. storing and printing on a pdf
    By jlm722 in forum Reports
    Replies: 4
    Last Post: 10-27-2009, 02:48 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