D
David
Hello wise ones,
Access 2003 user on WinXP. I am using the code below to surpress the
REPLACE tab in the acCmdFind command.
The btnFind control is located in the form header. I have the main form
with a tabbed subform. The code below works fine if the cursor is on the
first tab, but if I click on subsequent tabs, it does not surpress the
replace tab. It does display the msgbox in the code, so it does fire.
Any thoughts? Is this just a corrupt form?
'***** START OF CODE SAMPLE ************
On Error GoTo Err_btnFind_Click
Screen.PreviousControl.SetFocus
If Me.Dirty Then
Me.Dirty = False
End If
Me.AllowEdits = False 'Suppress REPLACE tab
MsgBox "allow edits false" 'for testing purposes
DoCmd.RunCommand acCmdFind
Me.AllowEdits = True 'Restore state
Exit Sub
Exit_btnFind_Click:
Exit Sub
Err_btnFind_Click:
If Err.Number = 2137 Then 'user clicked FIND on a Add new record recordset
MsgBox "Can't use FIND function now."
Else
MsgBox "Form Error #" & Err.Number & ", Notify Database Admin. "
End If
Me.AllowEdits = True
'MsgBox Err.Description
Resume Exit_btnFind_Click
'***** END OF CODE SAMPLE ************
Thank you,
Access 2003 user on WinXP. I am using the code below to surpress the
REPLACE tab in the acCmdFind command.
The btnFind control is located in the form header. I have the main form
with a tabbed subform. The code below works fine if the cursor is on the
first tab, but if I click on subsequent tabs, it does not surpress the
replace tab. It does display the msgbox in the code, so it does fire.
Any thoughts? Is this just a corrupt form?
'***** START OF CODE SAMPLE ************
On Error GoTo Err_btnFind_Click
Screen.PreviousControl.SetFocus
If Me.Dirty Then
Me.Dirty = False
End If
Me.AllowEdits = False 'Suppress REPLACE tab
MsgBox "allow edits false" 'for testing purposes
DoCmd.RunCommand acCmdFind
Me.AllowEdits = True 'Restore state
Exit Sub
Exit_btnFind_Click:
Exit Sub
Err_btnFind_Click:
If Err.Number = 2137 Then 'user clicked FIND on a Add new record recordset
MsgBox "Can't use FIND function now."
Else
MsgBox "Form Error #" & Err.Number & ", Notify Database Admin. "
End If
Me.AllowEdits = True
'MsgBox Err.Description
Resume Exit_btnFind_Click
'***** END OF CODE SAMPLE ************
Thank you,