CreateControl

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Armando

    #1

    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


  • shumaker@cs.fsu.edu

    #2
    Re: CreateControl

    Maybe the CreateControl method is intended for use in plugins for
    Access. I believe this is "how" you would run code in design view.

    Comment

    • Justin Hoffman

      #3
      Re: CreateControl

      "Armando" <armando@bogusa ddress.com> wrote in message
      news:gXvee.1971 $4a.187024@news 1.epix.net...[color=blue]
      > 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[/color]


      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.





      Comment

      • Douglas J. Steele

        #4
        Re: CreateControl

        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

        (no e-mails, please!)



        "Armando" <armando@bogusa ddress.com> wrote in message
        news:gXvee.1971 $4a.187024@news 1.epix.net...[color=blue]
        > 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
        >
        >[/color]


        Comment

        • Armando

          #5
          Re: CreateControl


          "Justin Hoffman" <j@b.com> wrote in message
          news:d5e6d5$4ce $1@nwrdmz03.dmz .ncs.ea.ibs-infra.bt.com...[color=blue]
          > "Armando" <armando@bogusa ddress.com> wrote in message
          > news:gXvee.1971 $4a.187024@news 1.epix.net...[color=green]
          > > 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[/color][/color]
          Access[color=blue][color=green]
          > > 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[/color][/color]
          know[color=blue][color=green]
          > > 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[/color][/color]
          redraw[color=blue][color=green]
          > > 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[/color]
          >
          >
          > Have you had a good think around this subject and decided that[/color]
          CreateControl[color=blue]
          > 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.
          >
          >
          >[/color]
          Justin -
          See my reply at Doug Steele...


          Comment

          • Armando

            #6
            Re: CreateControl

            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_djsteel e@NOSPAM_canada .com> wrote in message
            news:tKWdnYji_L SwN-ffRVn-1g@rogers.com.. .[color=blue]
            > 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" <armando@bogusa ddress.com> wrote in message
            > news:gXvee.1971 $4a.187024@news 1.epix.net...[color=green]
            > > 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[/color][/color]
            Access[color=blue][color=green]
            > > 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[/color][/color]
            know[color=blue][color=green]
            > > 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[/color][/color]
            redraw[color=blue][color=green]
            > > 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
            > >
            > >[/color]
            >
            >[/color]


            Comment

            Working...