A
Atlas
Hello,
I have a problem with setting Property Sheet values for a Form using VBA
code. I am trying to set the following properties:
..RecordSource
..InputParameters
..UniqueTable
I am setting this in an ADP and for a couple of my users my code works
without any problem, and for other users it errors because it cannot set the
properties in the form.
My code which works:
With Me.sfrmppepCGL_1_HeadsOfCover.Form
.RecordSource = "dbo.procHeadsOfCoverByPolicyLineIDTypeGet"
.InputParameters = "@lngPolicyLineID int =" & Nz(Me.txtPolicyLineID,
0) & ", @lngPolicyLineTypeID int = " & gclngPL_CGL
.UniqueTable = "dbo.tblHeadsOfCover"
End With
The error message I get when using the above code is:
Run-time error 2101
The setting you entered isn't valid for this property
Incidently, if i set the parameters using a different method it actually
works (not using WITH / END WITH):
Me.sfrmppepCGL_1_HeadsOfCover.Form.RecordSource =
"procHeadsOfCoverByPolicyLineIDTypeGet"
Me.sfrmppepCGL_1_HeadsOfCover.Form.UniqueTable = "tblHeadsOfCover"
Me.sfrmppepCGL_1_HeadsOfCover.Form.InputParameters = "@lngPolicyLineID int
=" & Nz(Me.txtPolicyLineID, 0) & ", @lngPolicyLineTypeID int = " & gclngPL_CGL
I can't understand why this would be the case - is there any library
references that I should check that i have not referenced?
Suggestions and help is greatly appreciated as I just can't work this one out.
Thanks
I have a problem with setting Property Sheet values for a Form using VBA
code. I am trying to set the following properties:
..RecordSource
..InputParameters
..UniqueTable
I am setting this in an ADP and for a couple of my users my code works
without any problem, and for other users it errors because it cannot set the
properties in the form.
My code which works:
With Me.sfrmppepCGL_1_HeadsOfCover.Form
.RecordSource = "dbo.procHeadsOfCoverByPolicyLineIDTypeGet"
.InputParameters = "@lngPolicyLineID int =" & Nz(Me.txtPolicyLineID,
0) & ", @lngPolicyLineTypeID int = " & gclngPL_CGL
.UniqueTable = "dbo.tblHeadsOfCover"
End With
The error message I get when using the above code is:
Run-time error 2101
The setting you entered isn't valid for this property
Incidently, if i set the parameters using a different method it actually
works (not using WITH / END WITH):
Me.sfrmppepCGL_1_HeadsOfCover.Form.RecordSource =
"procHeadsOfCoverByPolicyLineIDTypeGet"
Me.sfrmppepCGL_1_HeadsOfCover.Form.UniqueTable = "tblHeadsOfCover"
Me.sfrmppepCGL_1_HeadsOfCover.Form.InputParameters = "@lngPolicyLineID int
=" & Nz(Me.txtPolicyLineID, 0) & ", @lngPolicyLineTypeID int = " & gclngPL_CGL
I can't understand why this would be the case - is there any library
references that I should check that i have not referenced?
Suggestions and help is greatly appreciated as I just can't work this one out.
Thanks