Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

week commence date

Status
Not open for further replies.

Epsilon101

Programmer
Mar 30, 2004
384
GB
Hi, i have got a form made from a table called TblMain.

Each record has a date field for date entered.

I have made a field in TblMain to hold the week commenced date.

Just need to figure out how to have a working calculated field in the form so that the calculation saves in tblmain.

The unbound textbox on my form i
Code:
=TblMain!Date+1-Weekday(TblMain!Date,2)

So when someone enters the date it calculates the week commence date for monday to sunday setting.

Then it can be saved in the record.

---------------------------------------

Neil
 
I would bind the textbox to your table field. Then in the after update of the date text box that the user enters, set the other textbox equal to your calculation.

txtDateField AfterUpdate()

Mytextbox = TblMain!Date+1-Weekday(TblMain!Date,2)
 
Ah thanks for that one

Great help

---------------------------------------

Neil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top