473,387 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

change a checkbox when the date = today

i have a check box which if checked (manually) shows a person inactive or unchecked which shows active. If they are inactive then they don't show on the report. so i would like to control the state of the check box by example entering a date for a student who will be absent tomorrow and then tomorrow they will not show upon the report!
thanks,
Billy
Aug 25 '15 #1
4 1075
jimatqsi
1,271 Expert 1GB
A lot depends on the design of your database. Is there a different checkbox for each day? If so, when you enter that date, on a form I suppose, you can add some code to the AfterUpdate event of the textbox with the date. The code for that event can automatically set the checkbox for that date.

Or maybe you want to change your report query to examine the absent dates and avoid reporting records with the absent date = the reporting date.

There's very little information given here so we can't add a whole lot.

Jim
Aug 25 '15 #2
Seth Schrock
2,965 Expert 2GB
I think that you would find it easier to have your report check the Inactive Date field than to have the database check the box at a certain time. So you could have it setup so that you have a field called InactiveDate. Your report would then have the WHERE clause
Expand|Select|Wrap|Line Numbers
  1. WHERE InactiveDate <> Date()
Aug 25 '15 #3
Hi Guys, I wil try to be a bit more specific.

1) there is a form with several sub forms on it (in Tabs).
type a name in the main form to pull up their sub form.
2) their sub form has a check box which is called "inactive"
their sub form also has a tab for attendance in which days of the week are assigned.
3) the report i print is a daily register, which prints anyone's name who has been assigned to be in on that day (taken from their individual sub form)
4) the register report will not show anyone who has the inactive check box ticked.
5) their sub form also has a tab called absent in which you can assign a date for when they will be absent.
6) i want them who are actually absent that particular day not to show on the report.

i hope this makes some sense as it seems a bit long winded?

Billy
Aug 26 '15 #4
Seth Schrock
2,965 Expert 2GB
So does "Inactive" mean that they aren't scheduled that day and "Absent" mean that they are scheduled for that day, but didn't show up?

As I understand what you are trying, it would still be easier to use an Absent or Inactive date field than it would be to change the checkbox on a certain day.
Aug 26 '15 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Vinnie Davidson | last post by:
Hello! I'm trying to get all records from my SQL Server Database with "DeadlineDate" = today (not today - 24 hours). All records has a field called "DeadlineDate", and the date is stored in...
0
by: ammweb | last post by:
I am new to VB.NET and I am wanting the date December 12, 2006 to show up when the page is loaded. I have this on a label at the top of a page. Protected Sub Page_Load(ByVal sender As Object,...
5
mgpsivan
by: mgpsivan | last post by:
Hi, i have form in Asp.net(2003) in that i've to change the format of the date by the following statement Format(Date.Today, "dd/mm/yyyy") but when i give this code the month part displays as...
1
by: tomzji | last post by:
I am using Sql server 2005. I have one table named 'tblJob'. This table have two fields say 'Staus' and 'ExpiryDate'. when 'Expirydate' come to less than current date, i want to upadte 'Status'...
2
by: dangerouskicker | last post by:
dear friends any one can guide me or help, How i can change checkbox and radio button color change with java script regards devang
19
by: andersond | last post by:
I want the text to change from gray to bright red when the mouse is moved over the name of our company. Here is the code that doesn't work. What do I need to change to make this work? function...
3
by: ljoo87 | last post by:
How to change the value in gridview?? For example I made the timecard in asp.net when employee checks in it goes through the database and show date and check in or out gridview (total of two column...
2
by: tvnaidu | last post by:
How can I disable checkbox when it is selected Kernel?. <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td align="right" width="40%" valign="top"...
5
by: yappy77 | last post by:
I am trying to change the label color of a checkbox on a subform if it is checked. The code I have so far is: Private Sub Emergency_Contact_Click() If Me.Emergency Contact = True Then...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.