By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,369 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,369 IT Pros & Developers. It's quick & easy.

VBA Report Recordsource problem

P: 4
Hey,

I'm trying to assign to a report recordsource a variable name but I keep getting a message that the database isn't recognizing the control name.

The name of the report is BusinessUnitProductMeeting and this is how I'm referencing it in my VBA code in a Report_open procedure:

Reports!BusinessUnitProductMeeting!Controls!Record source = rpt_recordsource

What is wrong with the way I have that statement formed?

This is being done with VBA 6.3 on a Access 2002 db runtime error 2465 "can't find the field 'Controls' referred to in your expression"

Thanks
Oct 27 '06 #1
Share this Question
Share on Google+
3 Replies


PEB
Expert 100+
P: 1,418
PEB
Hi,

In fact you don't specify for which control you set up the control source! If it's for all the report you don't need to use this line:

Reports!BusinessUnitProductMeeting!Controls!Record source = rpt_recordsource


but this one:

Reports!BusinessUnitProductMeeting.Record source = rpt_recordsource

:)
Oct 27 '06 #2

PEB
Expert 100+
P: 1,418
PEB
Sorry,

Reports!BusinessUnitProductMeeting.Recordsource = rpt_recordsource
Oct 27 '06 #3

P: 4
Thanks PEB works like a charm
Oct 30 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.