Solved

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

Posted on 2011-02-10
3
216 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

920 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now