makauliuli61
10-30-2007, 01:28 PM
I have a table embedded in a form that data is entered on. The data to be entered is a project number, date, and a numerical value. I want the date to be entered only be on a Sunday. Is there a data validation rule to apply or do I need to use VBA? I do not know VBA!
KeithG
10-30-2007, 01:49 PM
something like below should work
Weekday([Forms]![FormName]![ControlName])=1
ControlName=Name of your control
formName= name of your form
RuralGuy
10-30-2007, 02:10 PM
Here's a useful link (http://www.pacificdb.com.au/MVP/Code/Dates.htm) for you to bookmark.
makauliuli61
10-30-2007, 02:12 PM
I don't think I entered this in the correct place. Where do I enter the suggested string "Weekday([Forms]![FormName]![ControlName])=1"?
Does it go under data validation in the table properties, subform properties, or the main form properties?
For the 'formName' do I enter the subform name or the main form? Also, the 'ControlName'...is that the field name?
I have the following set up:
'frm_EnterHrsWorkedListView'
- on this form I have a subform called 'frmsub_HrsWorkedAll'
- the subform contains the fields 'ProjectNo', 'Date', and 'Hours'
- these fields all stem from a table called 'tbl_HoursWorked' - which contains the same date and hours fields as the subform
THANKS!!