By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,264 Members | 1,237 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,264 IT Pros & Developers. It's quick & easy.

CreateControl

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a

"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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.