Advertisement

09.28.2007 at 03:09AM PDT, ID: 22858963
[x]
Attachment Details

Use VBA to Replace/Edit Control Source of Text Boxes on Report

Asked by gwflyer in Access Reports, Microsoft Access Database, Access Coding/Macros

Tags: vba, control, replace, source, report

I have about 250+ text boxes on a report that contain DLOOKUP or DSUM which reference the report name.  Sample:

=IIf(DLookUp("[DTyp]","[Date_t]","[Date] = #" & Format(Reports!rptSched45Days_v1!Now1,"dd-mmm-yy") & "#")='T',"T",IIf(DLookUp("[DTyp]","[Date_t]","[Date] = #" & Format(Reports!rptSched45Days_v1!Now1,"dd-mmm-yy") & "#")='H',"H",""))

My problem is that when I make a copy of the report and name it "rptSched45Days_v2", is there a way to use VBA (or some other method) to change the referenced report name in the "Control Source" for all 250+ text boxes on the report to match the new report name.  I hate to think about doing each "Control Source" one at a time.  I've researched this in EE and can't find any other questions of this nature.    As always, I appreciate your expert help.  Thank you.  George
Note:  There is no module to do an Edit>Replace, these are text boxes on the report.Start Free Trial
[+][-]09.28.2007 at 03:56AM PDT, ID: 19977647

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.28.2007 at 04:06AM PDT, ID: 19977682

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.28.2007 at 04:32AM PDT, ID: 19977795

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.28.2007 at 04:35AM PDT, ID: 19977806

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.28.2007 at 05:43AM PDT, ID: 19978162

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.28.2007 at 06:21AM PDT, ID: 19978432

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.28.2007 at 06:22AM PDT, ID: 19978440

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.28.2007 at 06:29AM PDT, ID: 19978479

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.30.2007 at 11:54PM PDT, ID: 19989108

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.01.2007 at 03:11AM PDT, ID: 19989679

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.01.2007 at 04:27AM PDT, ID: 19989926

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.29.2007 at 02:11PM PDT, ID: 20173330

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.29.2007 at 03:27PM PDT, ID: 20173766

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.30.2007 at 12:36AM PDT, ID: 20175173

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.30.2007 at 04:45AM PDT, ID: 20176083

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Reports, Microsoft Access Database, Access Coding/Macros
Tags: vba, control, replace, source, report
Sign Up Now!
Solution Provided By: LSMConsulting
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628