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
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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 December 12th, 2003, 09:05 PM
Authorized User
 
Join Date: Sep 2003
Location: , , Canada.
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default Creating form controls on the fly

Can new form controls be created on the fly depending on a recordset?
for instance in the onload method?

sub Form_Load()
  get all the data ready in a recordset
  then create the appropriate amount of labels text fields and
  check boxes.

Make them all visible
end sub

Thanks
-Roni

Roni Estein
Roni.Estein@e-drugscanada.com
https://www.e-drugsCanada.com
__________________
Roni Estein
Roni.Estein@e-drugscanada.com
https://www.e-drugsCanada.com
Reply With Quote
  #2 (permalink)  
Old December 12th, 2003, 11:48 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Clarksville, TN, USA.
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There may be another way of doing this. What are you after?
You can not create control arrays as you would in VB6, but, you can create a form in continuous form default and maybe use it for this.



Sal
Reply With Quote
  #3 (permalink)  
Old December 13th, 2003, 02:07 AM
Authorized User
 
Join Date: Sep 2003
Location: , , Canada.
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am kind of after the elusive consolidate function that I am reffing to in the Complicated Query http://p2p.wrox.com/topic.asp?TOPIC_ID=7540.

I am trying to do this in kind of a round about CompSci 101 type fashion. Create a 2D array from the recordset plus the added in false values for all the choices. Map those onto unbound fields. and use them to create the selection criteria for the that same refill question. I've read that this is not such a fast way to do things and that normally injecting new controls onto a form is a lot of overhead, but I'm not sure, or wasn't at the time aware of any other way of accomplishing this task. Perhaps those triggers will work or the ADO once I know how to approach it.

Best Regards,
-Roni

Roni Estein
Roni.Estein@e-drugscanada.com
https://www.e-drugsCanada.com
Reply With Quote
  #4 (permalink)  
Old December 13th, 2003, 08:06 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oxford, , United Kingdom.
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Roni

I could send you a couple of forms which do almost what you're looking for.

They should give you a starting point at least.

Let me know.


Brian Skelton
Braxis Computer Services Ltd.
Reply With Quote
  #5 (permalink)  
Old December 13th, 2003, 01:31 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Norwich, Norfolk, United Kingdom.
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Does the FormOnTheFly help at:

http://www.candace-tripp.com/access_downloads.htm

Clive Astley
Reply With Quote
  #6 (permalink)  
Old December 13th, 2003, 04:07 PM
Authorized User
 
Join Date: Sep 2003
Location: , , Canada.
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Braxis
 Roni

I could send you a couple of forms which do almost what you're looking for.

They should give you a starting point at least.

Let me know.


Brian Skelton
Braxis Computer Services Ltd.
Hi Brian & Clive,

Brian, that would be fantastic if you have the time.
You can email me at Roni.Estein@e-drugsCanada.com and let me know where I could check those out. I really appreciate it.

Clive, I will check out that URL ASAP, thanks for in advance for the tip.

Best Regards,
-Roni


Roni Estein
Roni.Estein@e-drugscanada.com
https://www.e-drugsCanada.com
Reply With Quote
  #7 (permalink)  
Old December 23rd, 2003, 01:30 PM
Authorized User
 
Join Date: Nov 2003
Location: Paola, Europe, Malta.
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I once did something of this sort using
Access.CreateControl
method but I found that it took a lot of time each time the form loads.
Maybe I was not using the right method but I did not find it helpful to have controls created each time the form loads.
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
Ch.14 Creating Windows Form User Controls problem SAIFI BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 1 September 29th, 2008 05:51 AM
Controls on the fly language rulllesss XML 0 June 9th, 2008 09:16 AM
Creating tables on the fly Keith Smith Access VBA 1 January 15th, 2008 10:49 AM
creating textfield on the fly Acod Classic ASP Professional 1 April 25th, 2007 09:22 AM
creating controls on the fly mtrtxs Access 9 September 10th, 2004 04:51 AM



All times are GMT -4. The time now is 07:17 AM.


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