C
Colombo
Guest
Hey All,
I've been parusing the forums the past day or so, since I've been working on a customer support database. I've found some of my answers, however I'm struggling with one in particular.
Here's the setup. I have a pretty typical customer support form, gather all the typical info. Then I have a check box to indicate whether the issue is closed or not. I also have a closed date text & resolution description text box.
What I would like to do is make it so the record can not be saved if the closed checkbox is checked, and the closed date & resolution description boxes are blank.
I have messed around with the "On Exit", "Before Update" commands in the Event tab.
I am not too strong on VB or programming commands/syntax. But working with another coworker, we came up with this.
This works, but if you click in the closed date box, you can not get out unless you type a date in......also....you can go back and uncheck the closed box...in which case you end up with a closed date and no closed checkmark.
I've come to a brick wall here....
Any help or suggestions would be extremely helpful.
Josh
I've been parusing the forums the past day or so, since I've been working on a customer support database. I've found some of my answers, however I'm struggling with one in particular.
Here's the setup. I have a pretty typical customer support form, gather all the typical info. Then I have a check box to indicate whether the issue is closed or not. I also have a closed date text & resolution description text box.
What I would like to do is make it so the record can not be saved if the closed checkbox is checked, and the closed date & resolution description boxes are blank.
I have messed around with the "On Exit", "Before Update" commands in the Event tab.
I am not too strong on VB or programming commands/syntax. But working with another coworker, we came up with this.
Code:
Private Sub ClosedDate_Exit(Cancel As Integer)
If Closed = -1 Then
If IsNull(ClosedDate) Then
MsgBox "you blew it"
Cancel = True
Exit Sub
End If
End If
End Sub
This works, but if you click in the closed date box, you can not get out unless you type a date in......also....you can go back and uncheck the closed box...in which case you end up with a closed date and no closed checkmark.
I've come to a brick wall here....
Any help or suggestions would be extremely helpful.
Josh