I have tickbox on a form, and I would like to use a date field as the
control source.
i.e. I would like to have it display as ticked when a date exists in
the field, and vice versa.
Also, when it is either checked or unchecked, I would like it to stamp
todays date or remove the date from the control source. I can see how
to do this if there are seperate fields for the checkbox and date, but
I would like to combine them into one field if possible.
Thanks in advance for any help!!! 4 2223
On 4 Jan 2007 05:43:52 -0800, "andrewbda" <an*******@gmail.comwrote:
You need only a single date field in your table. The field could be
"displayed" in an eventually hidden but for debug purposes visible
textbox. Then you create an unbound checkbox, and set its
controlsource to:
=Not Isnull(<your_date_field>)
-Tom.
>I have tickbox on a form, and I would like to use a date field as the control source.
i.e. I would like to have it display as ticked when a date exists in the field, and vice versa.
Also, when it is either checked or unchecked, I would like it to stamp todays date or remove the date from the control source. I can see how to do this if there are seperate fields for the checkbox and date, but I would like to combine them into one field if possible.
Thanks in advance for any help!!!
Thanks,
I know how to have the checkbox indicate whether there is data in the
field or not, but I would also like it ot be able to insert/delete the
date when ticked/unticked, this is the part I am having trouble with.
Will " =Not Isnull(<your_date_field>)" accomplish this?
Tom van Stiphout wrote:
On 4 Jan 2007 05:43:52 -0800, "andrewbda" <an*******@gmail.comwrote:
You need only a single date field in your table. The field could be
"displayed" in an eventually hidden but for debug purposes visible
textbox. Then you create an unbound checkbox, and set its
controlsource to:
=Not Isnull(<your_date_field>)
-Tom.
I have tickbox on a form, and I would like to use a date field as the
control source.
i.e. I would like to have it display as ticked when a date exists in
the field, and vice versa.
Also, when it is either checked or unchecked, I would like it to stamp
todays date or remove the date from the control source. I can see how
to do this if there are seperate fields for the checkbox and date, but
I would like to combine them into one field if possible.
Thanks in advance for any help!!!
"andrewbda" <an*******@gmail.comwrote in message
news:11**********************@s80g2000cwa.googlegr oups.com...
>I have tickbox on a form, and I would like to use a date field as the
control source.
i.e. I would like to have it display as ticked when a date exists in
the field, and vice versa.
Also, when it is either checked or unchecked, I would like it to stamp
todays date or remove the date from the control source. I can see how
to do this if there are seperate fields for the checkbox and date, but
I would like to combine them into one field if possible.
Thanks in advance for any help!!!
If you have a text box on your form which is bound to your date field then
you could then use If ... Then clauses in the form's Current event to test
for the presence of data and populate your check box accordingly.
Similarly, you could have code in the check box's update event to influence
the contents of the text box. Untested, but should get you started:
Form Current event:
If IsNull(Me.txtDate) Then
Me.chkDate = 0
Else
Me.chkDate = -1
End If
Check box Update event:
If Me.chkDate Then
Me.txtDate = Date()
Else
Me.txtDate = Null
End If
Me.Refresh
HTH - Keith. www.keithwilby.com
On 4 Jan 2007 06:19:42 -0800, "andrewbda" <an*******@gmail.comwrote:
No it won't. That expression only sets the value of the checkbox based
on whether there is a date or not.
If you want check/uncheck to set/clear the current date, I would write
my code in the <checkbox>_AfterUpdate event:
if Me.<checkbox= True then
Me.<your_date_field= Date()
else
Me.<your_date_field= Null
end if
-Tom.
>Thanks,
I know how to have the checkbox indicate whether there is data in the field or not, but I would also like it ot be able to insert/delete the date when ticked/unticked, this is the part I am having trouble with.
Will " =Not Isnull(<your_date_field>)" accomplish this?
Tom van Stiphout wrote:
>On 4 Jan 2007 05:43:52 -0800, "andrewbda" <an*******@gmail.comwrote:
You need only a single date field in your table. The field could be "displayed" in an eventually hidden but for debug purposes visible textbox. Then you create an unbound checkbox, and set its controlsource to: =Not Isnull(<your_date_field>)
-Tom.
>I have tickbox on a form, and I would like to use a date field as the control source.
i.e. I would like to have it display as ticked when a date exists in the field, and vice versa.
Also, when it is either checked or unchecked, I would like it to stamp todays date or remove the date from the control source. I can see how to do this if there are seperate fields for the checkbox and date, but I would like to combine them into one field if possible.
Thanks in advance for any help!!!
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: G |
last post by:
I have this field which is called "Statement Sent". It is a tick box.
There is another field called "Statement Sent Date". Its a date field.
How can I have the current date automatically populate...
|
by: BlackFireNova |
last post by:
This concerns an Access 2002 (XP) database. There are two fields,
"Notes" (Memo Field) and "Notes Update" on a form (among others)
which I am concerned with here.
Problem: I need to be able...
|
by: captain |
last post by:
Below is the sql for data with same date need
to extract + or - 5 days data of same date also.
How to also get data of + and - days related to same date.
SELECT IM.Area,
IM.Location,...
|
by: TimC |
last post by:
Hello all,
A question from someone who dabbles in Access.
Is it possible to hide or ghost out a combo box (or set of them) on a Form, and only have them appear as a usable option if a tick box...
|
by: Luvin lunch |
last post by:
Hi,
I'm new to access and am very wary of dates as I have limited
experience in their manipulation and I know if they're not done
properly things can turn ugly quickly.
I would like to use a...
|
by: Dixie |
last post by:
I have a table with records where each record has 14 tick boxes. Simply
speaking, I want a report which shows each record for which any of the tick
boxes is not ticked. It sounded simple until I...
|
by: xnatty89xx |
last post by:
I know this is probably a fairly simple question but i am relatively new to databases.
I have created a database for a riding school which records when people book a lesson, if they have paid a...
|
by: paul.bentley |
last post by:
I am trying to get a "Date entered" box to automatically fill when a
tick box = true, without success so its over to the experts for some
much needed help
Thanks in advance
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
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,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |