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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#Name?

Status
Not open for further replies.

sharonc

Programmer
Jan 16, 2001
189
0
0
US
Can someone tell me what is wrong with this code? I get #name? on the report instead of the data.

'Load File Header Record 10 to the report
strSQL = "Select * from tbl_Rec10;"
Set rs = db.OpenRecordset(strSQL)

rs.MoveLast
rs.MoveFirst

For Cntr = 1 To rs.RecordCount
[Reports]![rpt_HSATxtfile].RecType10.ControlSource = rs.Fields("RecType10")

rs.MoveNext

Next

rs.Close
Set rs = Nothing
 
Hi


For Cntr = 1 To rs.RecordCount
[Reports]![rpt_HSATxtfile].RecType10.ControlSource = rs.Fields("RecType10")

rs.MoveNext

Next

Since [Reports]![rpt_HSATxtfile].RecType10.ControlSource is "fixed" all this loop does is to set [Reports]![rpt_HSATxtfile].RecType10.ControlSource to the value of the last row in Rs, is that what you intended?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
I want to print every row in the table. There are 14 rows.

How do I print all rows?
 
Hi you define the controls in the detail section, make teh table teh control source of the report, Access will do the rest, easier still use the new report wizard

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top