Validate check box

  • Thread starter Thread starter chas1416
  • Start date Start date
C

chas1416

Guest
I have check box [yes/no] on a form. I want to be able to tick check box only if today is Friday or Saturday. Any ideas please?
 
Place the following code in the forms on open or on load

Dim 2day as integer

checkbox.enabled = false

2day = format(date(),"d")

Disable checkbox on form open or close

if 2day = 5 or 2day = 6 then
checkbox.enabled = true
end if

(5 = friday 6 = saturday)
 
Many thanks
Smart said:
Place the following code in the forms on open or on load

Dim 2day as integer

checkbox.enabled = false

2day = format(date(),"d")

Disable checkbox on form open or close

if 2day = 5 or 2day = 6 then
checkbox.enabled = true
end if

(5 = friday 6 = saturday)
 

Users who are viewing this thread

Back
Top Bottom