Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How can I do the following with VBA to a MS Access report?

Posted on 2011-02-10
3
221 Views
Last Modified: 2012-05-11
How can I create a text boxes dynamically and assign them a field name based on tables in a field?
0
Comment
Question by:kosenrufu
3 Comments
 
LVL 33

Accepted Solution

by:
jppinto earned 500 total points
ID: 34866340
0
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 34866357
Generally speaking, it is easier to just drag the fields to the report, then rename them automatically with my LNC Rename add-in.  The Access 2000-2003 version can be downloaded from this link:
http://www.helenfeddema.com/Files/code10.zip

and the Access 2007-2010 version from this link:
http://www.helenfeddema.com/Files/code63.zip


(unless there is something I am missing -- if so, please give more details on exactly what you are doing here)
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 34899058
Although this can be done, as you can see by the code jppinto posted, it is not what I would call "Easy"

Please remember that adding controls at runtime will decompile your application.
(How are you planning to recompile your code automatically?)

Also note that this WILL NOT work in an MDE file or the Access Runtime.
These are two of the most popular ways of running Access applications, so you may be doing all the work for naught...

Finally, in a global sense, this is rarely done...

Like Helen, I would like to know a little more about what you are trying to do here and why.

Perhaps there is a less complex alternative...


JeffCoachman
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question