Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 20th, 2006, 05:39 PM
Authorized User
 
Join Date: Feb 2006
Location: Sacramento, CA, USA.
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default Adding controls to a form

I have looked on the net and in my Access books and I can't find the code to dynamically add controls, such as combo boxes, labels, etc. to a form. I would like to have a drop down box so the user can pick a number and that many combo boxes and labels would be created. And once that is done can the source for the combo box be then set?

Thanks,
Scott
__________________
ScottP
Reply With Quote
  #2 (permalink)  
Old April 21st, 2006, 06:35 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

That's one option. I usually just create the combo boxes and labels and make them invisible. Then on the combo box after update event, set the combo boxes visible. I think you can either set the recordsource beforehand, or on the fly, but I don't have experience with that.

Also, make sure you use whatever code you use on the combo box after update event on the form's on current event.

HTH?

mmcdonal
Reply With Quote
  #3 (permalink)  
Old August 4th, 2009, 02:32 PM
Registered User
 
Join Date: Aug 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default A better way for txtBSCPIN1 to txtBSCPIN16 testing

I read your Q about testing txtBSCPIN1 to txtBSCPIN16 at EE and commented at:
http://thecrappyexpertsexchangeblog.blogspot.com/
Issue 16 is showing how to solve this using no-code.

Regards,

Nic;o)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding controls on vba form from an addin narendrapawar Pro VB 6 1 April 25th, 2010 04:59 PM
Adding controls to a form based on data received jontheniceguy Visual Basic 2005 Basics 0 April 7th, 2006 10:07 AM
Adding text/controls from one form to another Paula222 Access VBA 1 February 24th, 2006 10:10 AM
Adding Form controls in Datagrid (How to) chiefouko VS.NET 2002/2003 5 July 13th, 2004 12:24 AM



All times are GMT -4. The time now is 09:52 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.