473,385 Members | 1,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

CreateControl

Hi all -

Access 2000 - trying to add a feature to a distributable app where the user
can add controls, then size and place them, on an existing form. All I can
figure out about CreateControl is that it only works in Design View, but
what exactly IS that at run-time? Does the user have to have full Access
and not the DevToolKit runtime I want to package? There's only ONE type of
control I want the user to be able to add (a Label, which I will add OnClick
code to), so a whole toolbar would be a Bad Thing. How do you even run code
in Design View? Just for grins, I tried it from the Immediate window, with
the recipient form open in Design View, and got nothing. Not sure I had the
syntax right, but I'm still not sure it'll work like I want. I don't know
if drag-n-drop and sizing handles would be available, I'd have to kluge
something ugly to replace them if not. Ideas?

Also, will the form thus created be DoCmd.Save-able, allowing it to open as
is, or will I have to save the details after it's designed and then redraw
the customized form from scratch every time it opens? I can imagine how I'd
do that, but it might be slow and sloppy on opening.

Armando
Nov 13 '05 #1
5 3498
Maybe the CreateControl method is intended for use in plugins for
Access. I believe this is "how" you would run code in design view.

Nov 13 '05 #2
"Armando" <ar*****@bogusaddress.com> wrote in message
news:gX******************@news1.epix.net...
Hi all -

Access 2000 - trying to add a feature to a distributable app where the
user
can add controls, then size and place them, on an existing form. All I
can
figure out about CreateControl is that it only works in Design View, but
what exactly IS that at run-time? Does the user have to have full Access
and not the DevToolKit runtime I want to package? There's only ONE type
of
control I want the user to be able to add (a Label, which I will add
OnClick
code to), so a whole toolbar would be a Bad Thing. How do you even run
code
in Design View? Just for grins, I tried it from the Immediate window,
with
the recipient form open in Design View, and got nothing. Not sure I had
the
syntax right, but I'm still not sure it'll work like I want. I don't know
if drag-n-drop and sizing handles would be available, I'd have to kluge
something ugly to replace them if not. Ideas?

Also, will the form thus created be DoCmd.Save-able, allowing it to open
as
is, or will I have to save the details after it's designed and then redraw
the customized form from scratch every time it opens? I can imagine how
I'd
do that, but it might be slow and sloppy on opening.

Armando

Have you had a good think around this subject and decided that CreateControl
is definitely the way to go? Is there a sensible limit on the number of
labels which might get added? Perhaps you could create them all keep them
hidden to start with and let your users show/hide or move/resize them.

Nov 13 '05 #3
I don't believe the run-time allows you to get into Design view.

One approach is to put a bunch of hidden controls on the form, and to make
them visible as required.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Armando" <ar*****@bogusaddress.com> wrote in message
news:gX******************@news1.epix.net...
Hi all -

Access 2000 - trying to add a feature to a distributable app where the
user
can add controls, then size and place them, on an existing form. All I
can
figure out about CreateControl is that it only works in Design View, but
what exactly IS that at run-time? Does the user have to have full Access
and not the DevToolKit runtime I want to package? There's only ONE type
of
control I want the user to be able to add (a Label, which I will add
OnClick
code to), so a whole toolbar would be a Bad Thing. How do you even run
code
in Design View? Just for grins, I tried it from the Immediate window,
with
the recipient form open in Design View, and got nothing. Not sure I had
the
syntax right, but I'm still not sure it'll work like I want. I don't know
if drag-n-drop and sizing handles would be available, I'd have to kluge
something ugly to replace them if not. Ideas?

Also, will the form thus created be DoCmd.Save-able, allowing it to open
as
is, or will I have to save the details after it's designed and then redraw
the customized form from scratch every time it opens? I can imagine how
I'd
do that, but it might be slow and sloppy on opening.

Armando

Nov 13 '05 #4

"Justin Hoffman" <j@b.com> wrote in message
news:d5**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...
"Armando" <ar*****@bogusaddress.com> wrote in message
news:gX******************@news1.epix.net...
Hi all -

Access 2000 - trying to add a feature to a distributable app where the
user
can add controls, then size and place them, on an existing form. All I
can
figure out about CreateControl is that it only works in Design View, but
what exactly IS that at run-time? Does the user have to have full Access and not the DevToolKit runtime I want to package? There's only ONE type
of
control I want the user to be able to add (a Label, which I will add
OnClick
code to), so a whole toolbar would be a Bad Thing. How do you even run
code
in Design View? Just for grins, I tried it from the Immediate window,
with
the recipient form open in Design View, and got nothing. Not sure I had
the
syntax right, but I'm still not sure it'll work like I want. I don't know if drag-n-drop and sizing handles would be available, I'd have to kluge
something ugly to replace them if not. Ideas?

Also, will the form thus created be DoCmd.Save-able, allowing it to open
as
is, or will I have to save the details after it's designed and then redraw the customized form from scratch every time it opens? I can imagine how
I'd
do that, but it might be slow and sloppy on opening.

Armando

Have you had a good think around this subject and decided that

CreateControl is definitely the way to go? Is there a sensible limit on the number of
labels which might get added? Perhaps you could create them all keep them
hidden to start with and let your users show/hide or move/resize them.

Justin -
See my reply at Doug Steele...
Nov 13 '05 #5
Doug and Justin -

Thanks for the (similar) replies. I had discounted the "hide a shitload"
approach at first, but as I experiment with various other methods, and find
nothing that works really well, that is starting to look like the way to go.
The "reasonable upper limit" of hidden controls might be around 100 or more,
so you can see my hesitation. But trying to create these things
dynamically, over a bunch of Tab Pages, is looking too quirky, so I'm not
sure what I'll do.

What I'm trying to avoid is having to customize this thing for each and
every business that (hopefully) buys it - not to avoid the work, but to
maintain the appearance of a professional product. Enterprise-wide, I can
see working with the vendor, but this is a mom-n-pop business application.
Maybe keeping it "small-town" will make the hand-holding acceptable after
all...

Still chewing here, thanks again everyone.

Armando
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:tK********************@rogers.com...
I don't believe the run-time allows you to get into Design view.

One approach is to put a bunch of hidden controls on the form, and to make
them visible as required.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Armando" <ar*****@bogusaddress.com> wrote in message
news:gX******************@news1.epix.net...
Hi all -

Access 2000 - trying to add a feature to a distributable app where the
user
can add controls, then size and place them, on an existing form. All I
can
figure out about CreateControl is that it only works in Design View, but
what exactly IS that at run-time? Does the user have to have full Access and not the DevToolKit runtime I want to package? There's only ONE type
of
control I want the user to be able to add (a Label, which I will add
OnClick
code to), so a whole toolbar would be a Bad Thing. How do you even run
code
in Design View? Just for grins, I tried it from the Immediate window,
with
the recipient form open in Design View, and got nothing. Not sure I had
the
syntax right, but I'm still not sure it'll work like I want. I don't know if drag-n-drop and sizing handles would be available, I'd have to kluge
something ugly to replace them if not. Ideas?

Also, will the form thus created be DoCmd.Save-able, allowing it to open
as
is, or will I have to save the details after it's designed and then redraw the customized form from scratch every time it opens? I can imagine how
I'd
do that, but it might be slow and sloppy on opening.

Armando


Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: wschneider | last post by:
Hi I have a problem with passing a runtime license key for an ActiveX control to the method CreateControl() of the class pywin.mfc.activex.Control. Can anybody give me a hint in which form...
2
by: Charles | last post by:
Ok, so I'm creating a form on the fly. I can create the option group, I can create the checkboxes, but I can't figure out how to bind them to the option group I'm creating them within. I was...
1
by: derhally | last post by:
I currently have the IE ActiveX object embedded inside an application. I'm running into a problem where when I make the control visible or have it navigate to a different page, the application...
2
by: theo | last post by:
Hi... I wish to extract the text content of an Xml file and assign it to DropDownList controls at runtime.I can get the Xml file text content into the DropDownList controls (Ex...if 5 Xml text...
4
by: theo | last post by:
Program flow...load file,then extract the xml text tags from the file,then the number of Xml tags retrieved from the file determines the number of dropdownlist controls instanciated in the...
0
by: theo | last post by:
Hello..I have a similar issue as yesterday but the situation has slightly changed so perhaps someone can shed some more light on the issue... Program flow - load file,extract xml text tags from...
1
by: PJ6 | last post by:
This would have been better if I could have just implemented an interface or two to author my own toolstrip controls... but no, I have to inherit from just the existing ones. Fine, I thought... ...
7
by: =?Utf-8?B?TWF0dA==?= | last post by:
Hi I have an app that runs without a main form, just a notification icon, when the user clicks the icon the form is shown, and when the form is minimized it's hidden. This all works great,...
7
by: chrismaliszewski | last post by:
Hi. I created code which makes dynamically form with bounded controls for all columns. I show it to you below. My problem is, how I have to change this code to create form which record source...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.