Re: Storing dates

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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!




.



Relevant Pages

  • Re: Storing dates
    ... get today's date in that format. ... In a form I have a Yes/No bit which when checked, stores a 1 in my SQL ... Ha eliminado 454 correos spam hasta la fecha. ... Estoy utilizando la versión gratuita de SPAMfighter para usuarios privados. ...
    (microsoft.public.access.forms)
  • Re: Storing dates
    ... But how would I populate a field today_date with Format, "yyyymmdd") ... get today's date in that format. ... Estoy utilizando la versión gratuita de SPAMfighter para usuarios privados. ... Ha eliminado 454 correos spam hasta la fecha. ...
    (microsoft.public.access.forms)
  • Re: Wildcards in einem Parameterwert
    ... > abgesegnet wurde und nur von Amis erfunden werden konnte. ... Bei denen ist es bewusst Text im Format ... YYYYMMDD, genauer "Text der nur Ziffern enthalten darf" (Datentyp ...
    (microsoft.public.de.access)
  • Re: Access - ODBC to SQL - Incorrect Results
    ... holding the same format of data are acting differently in ACCESS. ... BTW. X-Base programs translated dates to yyyymmdd for sorting purposes ... So there should be no unsolvable problem in your using this ... and give it regular gas ... ...
    (comp.databases.ms-access)
  • Re: Date Format
    ... Is the field data type definitely a DateTime? ... Input mask only constrains user keystrokes, ... can have any output format you want. ... > I open the form the date reverts back to the yyyymmdd format, ...
    (microsoft.public.access.tablesdbdesign)