Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object reference in a Report

Status
Not open for further replies.

mdmarney

IS-IT--Management
Jan 16, 2003
68
0
0
US
I know I have posted this before, but am having trouble getting a good answer.
Here is the current code:
It works great in a form, but not in a report.

Dim rs As Object
Set rs = CurrentDb.OpenRecordset("Select * from tbl_Attendants Where Tee_Shirt_Size = 'L'")
rs.MoveLast
Me.tx_L_Count = rs.RecordCount

**The error is on the assignment to the text box line.**
It says, "You can't assign a value to this object."

Me!tx... Does nott help anything.
Thanks! *************
M. MARNEY
 
Why do you get the error when trying to assing the number? Have you:
1) Used the debugger and set a breakpoint on the line?
2) Inspected the value of the rs.RecordCount?
3) Inspected the value of tx_L_Count just prior to the assignment?
4) Placed you code in the correct report event?

Try these and let us know the results. -------------------------------------
scking@arinc.com
Try to resolve problems independently
Then seek help among peers or experts
But TEST recommended solutions
-------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top