Make a button invisible based on Data submitted (1 Viewer)

trevor2524

Registered User.
Local time
Today, 06:49
Joined
Feb 22, 2016
Messages
43
Hello, I'm starting completely from scratch and need help with this design. I'm trying to create a checklist of items to do everyday.

Criteria:

Textbox next to a button that represents the task. when the user clicks the button the information from the textbox gets submitted to a table and the button and textbox now become invisible.

also the date would need to be timestamped with the information from the textbox when submitted to table.

Question: Is there a way to have a backend date system that automatically keeps track of the day. This way if a user forgets to check something on one day and then comes in the next day they cant readjust the previous days information. when the neew day comes up the sytem will automatically see that is is a new day and make all buttons and textboxes visible again.

Any ideas and help on this would be appreciated. I'm starting completely from scratch and I'm having a hard time getting started.

Thanks,

Trevor
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 03:49
Joined
Aug 30, 2003
Messages
36,132
I would probably be thinking about it from a data perspective. It would be a continuous form showing all the incomplete tasks. When they complete one, it would be marked as such, and the form requeried.
 

Minty

AWF VIP
Local time
Today, 11:49
Joined
Jul 26, 2013
Messages
10,373
2 possible approaches - not sure either is correct;
a) Why not record what they have done and then report on what is missing.
b) If the task needs doing everyday I'm not sure you need to create /them once a day, why not just fill a table with tasks for the next 6 months and get each one completed. if it's not completed it stays showing on a "you need to do this list"
 

trevor2524

Registered User.
Local time
Today, 06:49
Joined
Feb 22, 2016
Messages
43
I would probably be thinking about it from a data perspective. It would be a continuous form showing all the incomplete tasks. When they complete one, it would be marked as such, and the form requeried.

Thats correct. I'm going for the visual standpoint of when a user opens the form they see what needs to be done. not having to read a report because then things can get confusing for some users on what row they are reading. But if a button is visible then the user would know that that task still needs to be done. Would you happen to know the coding to get this done?
 

trevor2524

Registered User.
Local time
Today, 06:49
Joined
Feb 22, 2016
Messages
43
2 possible approaches - not sure either is correct;
a) Why not record what they have done and then report on what is missing.
b) If the task needs doing everyday I'm not sure you need to create /them once a day, why not just fill a table with tasks for the next 6 months and get each one completed. if it's not completed it stays showing on a "you need to do this list"

Can you explain your second option more. That sounds doable this way if more tasks get entered i can just add to the table that is being submitted. How would you make it so that only the items not completed will show up for that day?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 05:49
Joined
Feb 28, 2001
Messages
27,313
Is there a way to have a backend date system that automatically keeps track of the day.

Look up the Now() function and/or the Date() function for this purpose. Date is date-only; Now is date and time of day. They read your computer's internal clock. If your site has access to NTP (Network Time Protocol) then your workstation's clock will be accurate to within fractions of a second, even with a slow network.

Then, to know that this is a new day, you take a timestamp anytime someone does something noteworthy. Then when your form loads (see form Load event, e.g.), run a query to look for the last time that user did something noteworthy and see if it is the same day. Hint: If the timestamp is a date/time variable, the units are days and fractions of a day since the system reference date of about 1-Jan-1900 or so. The actual variable is a typecast of a basic DOUBLE floating value. So if you did CLng(date-var), that is a day number. If you have the CLng() of two different date variables, you can directly compare to see if they are equal (same-day) or not (different days).
 

Minty

AWF VIP
Local time
Today, 11:49
Joined
Jul 26, 2013
Messages
10,373
Can you explain your second option more. That sounds doable this way if more tasks get entered i can just add to the table that is being submitted. How would you make it so that only the items not completed will show up for that day?
Lets assume a simple table tblTasks with a couple of fields;
tblTasks
TaskID - Autonumber - Primary key (PK)
TaskTypeID - Foreign Key (FK) Another number linked back to a table of common tasks
DueDate - The date the task should be done
AssignedTo - EmployeeID that should be completeing the task
CompletedDate - The date the task was completed
CompletedBy - EmployeeID that performed the task.

You now create a simple query that lists all tasks where the completed date is null. This is your "To do" list, and you can filter / display it by employee assigned if you need to.
You could easily add a sign off date field if a line manager needs to check the work done, and create a similar "Sign Off" list based on the line manager ID pulled in from the employee table...
 

Users who are viewing this thread

Top Bottom