Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-02-10
3
Medium Priority
?
229 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 2000 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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 developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

782 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