Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 12th, 2003, 09:05 PM
Authorized User
 
Join Date: Sep 2003
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
[email protected]
https://www.e-drugsCanada.com
__________________
Roni Estein
[email protected]
https://www.e-drugsCanada.com
 
Old December 12th, 2003, 11:48 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
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
 
Old December 13th, 2003, 02:07 AM
Authorized User
 
Join Date: Sep 2003
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
[email protected]
https://www.e-drugsCanada.com
 
Old December 13th, 2003, 08:06 AM
Friend of Wrox
 
Join Date: Jun 2003
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.
 
Old December 13th, 2003, 01:31 PM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old December 13th, 2003, 04:07 PM
Authorized User
 
Join Date: Sep 2003
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 [email protected] 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
[email protected]
https://www.e-drugsCanada.com
 
Old December 23rd, 2003, 01:30 PM
Authorized User
 
Join Date: Nov 2003
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.





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





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