Solved

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

Posted on 2011-02-10
3
226 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
[X]
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
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

623 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