All Day Event...

  • Thread starter Thread starter Rick's News
  • Start date Start date
R

Rick's News

How do I code a check box to set the current records, start time, and end
time of an appointment to a specific time.
CheckBox 1 = All Day Event...

if [checkbox 1] = true then
[Start Time] = 07:00
[End Time] = 17:00
else
[Start Time] =[Start Time]
[End Time] = [End Time]
end if
end sub

Am I on the right track???

Thanks in Advance...

-Rick
 
Assuming the times are date/time data type, do this:

If Me![checkbox 1] = True Then
Me![Start Time] = #07:00#
Me![End Time] = #17:00#
Me![Start Time].Locked = True
Me![End Time].Locked = True
Else
Me![Start Time].Locked = False
Me![End Time].Locked = False
End If

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
http://www.deanforamerica.com/site/TR?pg=personal&fr_id=1090&px=1434411
 
Thanks John that is just what I needed!

John Viescas said:
Assuming the times are date/time data type, do this:

If Me![checkbox 1] = True Then
Me![Start Time] = #07:00#
Me![End Time] = #17:00#
Me![Start Time].Locked = True
Me![End Time].Locked = True
Else
Me![Start Time].Locked = False
Me![End Time].Locked = False
End If

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
http://www.deanforamerica.com/site/TR?pg=personal&fr_id=1090&px=1434411
Rick's News said:
How do I code a check box to set the current records, start time, and end
time of an appointment to a specific time.
CheckBox 1 = All Day Event...

if [checkbox 1] = true then
[Start Time] = 07:00
[End Time] = 17:00
else
[Start Time] =[Start Time]
[End Time] = [End Time]
end if
end sub

Am I on the right track???

Thanks in Advance...

-Rick
 
Back
Top