stevenblanc
Registered User.
- Local time
- Today, 11:32
- Joined
- Jun 27, 2011
- Messages
- 103
Hi folks,
Looking for a little help here. I have a form that allows my users to select a customer from a list and inputs that customerID into whichever parent form they call it from. This works fine for 90 percent of my forms, however, I am getting the following error on one form:
The body of the code is as follows with the text in bold being the error line:
At this point in time the variables included are set as follows (revealed by hovering over the variables):
So I am certain that the With Block does in fact have an object (frmAccounting_ReceiptEntry).
Any ideas would be greatly appreciated.
Cheers,
Steven
Looking for a little help here. I have a form that allows my users to select a customer from a list and inputs that customerID into whichever parent form they call it from. This works fine for 90 percent of my forms, however, I am getting the following error on one form:
Run-time error '91'
Object Variable or With Block variable not set.
The body of the code is as follows with the text in bold being the error line:
Code:
With Forms(txtParentForm)
If .DataEntry = True Then
.DataEntry = False
.AllowAdditions = False
End If
[B][U][COLOR="Red"].Recordset.FindFirst strLinkCriteria[/COLOR][/U][/B]
If .Recordset.NoMatch Then MsgBox "The selected record no longer exists."
.txtFocus.SetFocus
.txtCustomerID.Enabled = False
End With
At this point in time the variables included are set as follows (revealed by hovering over the variables):
Code:
txtParentForm = "frmAccounting_ReceiptEntry" [COLOR="SeaGreen"]'This is actually set by a me.form.name and works I don't get the error for other forms.[/COLOR]
strLinkCriteria = "[CustomerID]='2DAUTO01'"
So I am certain that the With Block does in fact have an object (frmAccounting_ReceiptEntry).
Any ideas would be greatly appreciated.
Cheers,
Steven