error 2465 in Form_Activate event Procedure

G

Guest

Hello everyone,
I would like to find out how to fix this error that shows up on the "Before
Update to prevent duplicate entries". I am presently
using the following code:
The error reads like this
Title of error> " Error in Form_Activate event Procedure"
Message > "error 2465
Microsoft access can't find the field 'l' referred to in your expression."

Here is my code,


Private Sub Form_Activate()
On Error GoTo Err_Form_Activate
Me.Requery
If IsLoaded("Orders by Customer") Then
If Forms![Orders by Customer]![Orders by Customer
Subform].Form.RecordsetClone.RecordCount > 0 Then
DoCmd.GoToControl "OrderID"
DoCmd.FindRecord Forms![Orders by Customer]![Orders by Customer
Subform].Form![OrderID]
End If
End If

Exit_Form_Activate:
Exit Sub

Err_Form_Activate:
MsgBox "Error " & Err.Number & ": " & Err.Description, , _
"Error in Form_Activate event procedure..."
Resume Exit_Form_Activate
End Sub

I am having no luck figuring this out.
Thanks in advance for the help
 
M

MacDermott

Perhaps you could tell us what this code is supposed to achieve?

Alvin said:
Hello everyone,
I would like to find out how to fix this error that shows up on the "Before
Update to prevent duplicate entries". I am presently
using the following code:
The error reads like this
Title of error> " Error in Form_Activate event Procedure"
Message > "error 2465
Microsoft access can't find the field 'l' referred to in your expression."

Here is my code,


Private Sub Form_Activate()
On Error GoTo Err_Form_Activate
Me.Requery
If IsLoaded("Orders by Customer") Then
If Forms![Orders by Customer]![Orders by Customer
Subform].Form.RecordsetClone.RecordCount > 0 Then
DoCmd.GoToControl "OrderID"
DoCmd.FindRecord Forms![Orders by Customer]![Orders by Customer
Subform].Form![OrderID]
End If
End If

Exit_Form_Activate:
Exit Sub

Err_Form_Activate:
MsgBox "Error " & Err.Number & ": " & Err.Description, , _
"Error in Form_Activate event procedure..."
Resume Exit_Form_Activate
End Sub

I am having no luck figuring this out.
Thanks in advance for the help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top