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!

Accessing a Report element in VBA

Status
Not open for further replies.

DavidArchibald

IS-IT--Management
Oct 29, 2000
20
0
0
NZ
I'm a newbie to Access VBA so apologies in advance if this is a bit of a dumb question.

I have a value in a text field in a report - InvoiceNo and I want to use this to do some backend tidying up with VBA when the report is closed.

How do I reference the variable?

The Report name is [Print Invoice] and the text box (which gets its value from an underlying query) is called Invoice No.

I want to do something along the lines of:

x = Reports-collections.reportname.object.value

if that makes sense.

Thanks
 
Hi

You are more or less there

Reports("Print Invoice")![Invoice No]

However [Invoice No] is only in scope in the section to which it belongs (eg say detail section)

Regards
Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
kenneth.reaySPAMNOT@talk21.com
remove SPAMNOT to use
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top