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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A few Outlook Form Programming Questions 1

Status
Not open for further replies.

MichaelF81

Programmer
Sep 20, 2005
178
0
0
US
OK, I have a few questions on a form I am designing in Outlook 2003.

1) I have 2 text boxes called reqNo and reqYes (these are for whether the service is required). reqNo is checked by default, and when someone checks reqYes I want it to uncheck reqNo and vice versa.

2) I have a required attendees field added as well, I want this field to be disabled for reqNo is checked and enabled when reqYes is checked.

3) I want to add code to check to see if the current date is at least 24 hours in advance to the scheduled date, and if not, pop-up a message telling them.

Thanks in advance, please let me know if any of this needs more explanation.
 

Code:
Private Sub reqYes_Change()
     If reqYes Then
          reqNo = False
          reqAttendees.Enabled = True
     End If 
End Sub

Private Sub reqNo_Change()
     If reqNo Then 
          reqYes = False
          reqAttendees.Enabled = False
     End If
End Sub

Private Sub ScheduleDate_Exit()
     If ScheduleDate.Value - Now()<1 Then 
          msgBox "Alert", vbOkOnly
          ScheduleDate.Activate
     End If
End Sub

That should do it!
 
cool

thanks!




"Adults are just obsolete children and the hell with them." - Dr. Seuss
 
This did not work. I even tried

Private Sub reqYes_Change()
If reqYes.value = True Then
reqNo.value = False
Require.Enabled = True
End If
End Sub

Private Sub reqNo_Change()
If reqNo.value = True Then
reqYes.value = False
Require.Enabled = False
End If
End Sub



Any thoughts on how to make it so that when you check Yes it automatically un-checks no and enables the Require field.




"Adults are just obsolete children and the hell with them." - Dr. Seuss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top