Re: Storing dates
- From: "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Nov 2006 11:53:16 -0500
Easiest way would likely be to put logic in the AfterUpdate event of
checkbox to set the today_date field.
Private Sub MyCheckBox_AfterUpdate()
If Me.MyCheckBox = True Then
Me.today_date = Format(Date(), "yyyymmdd'0
Else
Me.today_date = vbNullString
End If
End If
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Ana" <nospam@xxxxxxxxx> wrote in message
news:%23xMiUzJFHHA.1816@xxxxxxxxxxxxxxxxxxxxxxx
Thank you for answering.
Unfortunately cannot change the table's structure.
But how would I populate a field today_date with Format(Date(),
"yyyymmdd") when the yes/no bit is selected?Thank you again
"Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx> escribió en el
mensaje news:OCU%23xlHFHHA.2268@xxxxxxxxxxxxxxxxxxxxxxx
You're better off just storing the date in a Date field, and applying a
format to it.
If you must use a text field, you can use Format(Date(), "yyyymmdd") to
get today's date in that format.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Ana" <nospam@xxxxxxxxx> wrote in message
news:%233QLoeHFHHA.1912@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
In a form I have a Yes/No bit which when checked, stores a 1 in my SQL
table. I need to store today's date as well in a field called today_date
when the bit is set but in an yyyymmdd format. How do I accomplish it?
TIA
Ana
--------------------------------------------------------------------------------
Estoy utilizando la versión gratuita de SPAMfighter para usuarios
privados.
Ha eliminado 454 correos spam hasta la fecha.
Los abonados no tienen este mensaje en sus correos.
¡Pruebe SPAMfighter gratis ya!
.
- Follow-Ups:
- Re: Storing dates
- From: Ana
- Re: Storing dates
- References:
- Storing dates
- From: Ana
- Re: Storing dates
- From: Douglas J. Steele
- Re: Storing dates
- From: Ana
- Storing dates
- Prev by Date: RE: form help
- Next by Date: Prevent changes of one field on a form
- Previous by thread: Re: Storing dates
- Next by thread: Re: Storing dates
- Index(es):
Relevant Pages
|