Probably a silly date question

  • Thread starter Thread starter SueM
  • Start date Start date
S

SueM

Hi,

I have two textboxes on a form. Textbox1 allows the user
to enter the date for the data defaulting to todays date
and linking back to a table where the data is stored.

Textbox2 is the one I have problems with. I need it to
return the day of the week based on the information in
Textbox1.

I can get this value by using textbox1 as the control
source of textbox2, and dddd as the format but then I have
no idea how to link the information back to the data
table.

Any ideas how to get the data back to the table? Or on
other ways to return the day of the week value ie macros?

It may seem silly to need the day of the week, but it will
make reports more readable.

I have asked a similar question here before and have done
a lot of fiddling since, but am giving up in frustration.

Cheers,

Sue
 
SueM said:
Hi,

I have two textboxes on a form. Textbox1 allows the user
to enter the date for the data defaulting to todays date
and linking back to a table where the data is stored.

Textbox2 is the one I have problems with. I need it to
return the day of the week based on the information in
Textbox1.

I can get this value by using textbox1 as the control
source of textbox2, and dddd as the format but then I have
no idea how to link the information back to the data
table.

Any ideas how to get the data back to the table? Or on
other ways to return the day of the week value ie macros?

It may seem silly to need the day of the week, but it will
make reports more readable.

I have asked a similar question here before and have done
a lot of fiddling since, but am giving up in frustration.

Cheers,

Sue


Why do you feel you need to store the day of the week in the Table?
You already have all the date information in the value held in your
date field in the Table, so to store the day of the week again and
separately would be redundant. Also, if you ever needed to correct an
already stored date, then you would have to include code that ensured
the stored day of the week got changed as well. Why bother?

Whenever you need any part of the date information on a Form or on a
Report, just use Format() to extract what you need.

You can do this in a text box, as code in the Current event of your
form, in the format event of the appropriate Report section or in an
underlying Query. Take your pick!


hth

Hugh
 
Back
Top