G
Guest
When running a report, i get an error
"Run-time error '-2147352567 (80020009)': You can't assign a value to this
object."
I have a text field, rptAlloy, and want to fill it with a field from a query
that filled from the form that generates the report...i.e. Form to view
data->click preview/print report->qyr runs->report is generated
here is the code for when the rpt opens up:
Private Sub Report_Open(Cancel As Integer)
Dim C1894db As Database
Dim rst As Recordset
Set C1894 = CurrentDb
Set rst = C1894.OpenRecordset("qryReport")
MsgBox (rst!Alloy)
Me.rptAlloy = rst!Alloy
End Sub
i have the MsgBox as a test, and the MsgBox comes up with the right entry,
however the textbox i want to store the value in won't accecpt the value.
any suggestions? (i have about 25-30 fields, and i wanted to keep the same
formatting as the form view, so i copied the form, and pasted it in the
report, but then "redrew everything from scratch...)
"Run-time error '-2147352567 (80020009)': You can't assign a value to this
object."
I have a text field, rptAlloy, and want to fill it with a field from a query
that filled from the form that generates the report...i.e. Form to view
data->click preview/print report->qyr runs->report is generated
here is the code for when the rpt opens up:
Private Sub Report_Open(Cancel As Integer)
Dim C1894db As Database
Dim rst As Recordset
Set C1894 = CurrentDb
Set rst = C1894.OpenRecordset("qryReport")
MsgBox (rst!Alloy)
Me.rptAlloy = rst!Alloy
End Sub
i have the MsgBox as a test, and the MsgBox comes up with the right entry,
however the textbox i want to store the value in won't accecpt the value.
any suggestions? (i have about 25-30 fields, and i wanted to keep the same
formatting as the form view, so i copied the form, and pasted it in the
report, but then "redrew everything from scratch...)