473,471 Members | 1,964 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Unclick check box!

2 New Member
Hello all,

I've created a database using Access 2003. One part of it has a check box which is linked to a blank field (a date), so that if I click on the box, today's date will appear on the space of the field. That part is fine.

Now I'd like to know if there's a way to delete the date in the field (from the table) when I unclick the check box, so that everything goes back to its pre-clicked state.

Please feel free to throw in some comments and advice. Many thanks.

Smoothie2006
Nov 13 '07 #1
2 2543
Megalog
378 Recognized Expert Contributor
Sounds easy enough, this is how I do it.

You probably already have an OnClick event for this checkbox when you insert today's date, so modify it to fit the following:

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourCheckBox_Click()
  2.     If Me.YourCheckBox.Value = True Then
  3.         Me.YourDatefield.Value = Now()       
  4.     Else
  5.         Me.YourDatefield.Value = ""    
  6.     End If
  7. End Sub
Nov 13 '07 #2
smoothie2006
2 New Member
Hey, thank you so much for your help! :)
Nov 14 '07 #3

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

Similar topics

7
by: Tony Johnson | last post by:
Can you make a check box very big? It seems like when you drag it bigger the little check is still the same size. Thank you, *** Sent via Developersdex http://www.developersdex.com ***...
7
by: Neil | last post by:
I have a check box on a form that's bound to a function that returns a True/False value. When the user clicks on the check box, I run some code through the MouseDown event. Everything works fine. ...
0
by: H. Scott Buckwalter | last post by:
ASP.NET: I want to control the color of the text for a check box control in JavaScript on the client. I am able to do this by surrounding the check box in a SPAN tag. I then color the span and...
2
by: Vic | last post by:
Hi. Is it possible to make web form's check box control (and/or an HTML check box control) to have a thin fixed line for a box instead of a 3d box style. I'd like the check box to look similar...
1
by: scprosportsman | last post by:
Please help guys, i am trying to set up a database here at work and im fairly new to access in terms of writing functions and queries and stuff. I have 2 different places on my design that will...
2
by: Chris Davoli | last post by:
How do you enable a check box in the GridView. I selected Checkbox Field in the Columns of the GridView, and the check box shows up in the Grid view, but it is disabled. How do I enable it so I can...
4
by: peter | last post by:
I've come across a weird difference between the behaviour of the Tkinter checkbox in Windows and Linux. The issue became apparent in some code I wrote to display an image in a fixed size canvas...
5
by: Andrew Meador | last post by:
I have a form (Change Card List by Status) with a check box (cboNOT) and a list box (lstStatus). There is an Open Report button that opens a report (Report - Change Card List) which uses a query...
4
by: mmasood | last post by:
I would like to know how i can make a multiple selection check box for e.g. like yahoo in box if you select or deselect the header check box all the below check boxes are checked or unchecked. In...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.