mark curtis
Registered User.
- Local time
- Today, 11:22
- Joined
- Oct 9, 2000
- Messages
- 457
Dear All,
A little problem for all the experts out there:
I have a form which consists of 6 tabs, one of the tabs is for change requests. When a user clicks on the change request form I set the focus to the change title, which must be populated in order to register a record in the change title.
My problem is that if the user skips the change title field and tries to populate other fields an error message "index primary key can't contain null". So what I need is an on exit of the change title field: a message box that will force the user to populate the field or close the change tab.
I have tried the following:
If IsNull(Me.ChangeTitle) Or Me.ChangeTitle = "<MANDATORY>" Then
Cancel = True
MsgBox "Please enter a Change Title before proceeding", 48, "Change Title Required"
Me.ChangeTitle.SetFocus
Exit Sub
End If
And it seems to solve part of the problem but if I close the form via the 'x' in top right of form, the message box is still visible and I have to click it 4 times. I believe I need some error trapping but have not got a clue?? Please help
A little problem for all the experts out there:
I have a form which consists of 6 tabs, one of the tabs is for change requests. When a user clicks on the change request form I set the focus to the change title, which must be populated in order to register a record in the change title.
My problem is that if the user skips the change title field and tries to populate other fields an error message "index primary key can't contain null". So what I need is an on exit of the change title field: a message box that will force the user to populate the field or close the change tab.
I have tried the following:
If IsNull(Me.ChangeTitle) Or Me.ChangeTitle = "<MANDATORY>" Then
Cancel = True
MsgBox "Please enter a Change Title before proceeding", 48, "Change Title Required"
Me.ChangeTitle.SetFocus
Exit Sub
End If
And it seems to solve part of the problem but if I close the form via the 'x' in top right of form, the message box is still visible and I have to click it 4 times. I believe I need some error trapping but have not got a clue?? Please help