[AccessD] Turn a recordset into an actual table

Bill Benson bensonforums at gmail.com
Tue Oct 26 08:42:56 CDT 2021


Well explained thanks Jim.

On Tue, Oct 26, 2021 at 9:14 AM Jim Dettman via AccessD <
accessd at databaseadvisors.com> wrote:

> Bill,
>
> No because there are several problems with creating controls at run-time.
>
> Forms have a lifetime limit on the number of controls you can create.
>  Once you hit that limit, you can’t create any more controls.   You can
> avoid that if you create the form from scratch each time though.    Note
> also that the form needs to be in design view to create controls, so you
> must be using a .accdb (no .accde allowed).   Typically, you’ll want to
> have code associated with the form/controls as well.   While you can add
> the code, it will put your project into an un-compiled state and run slower
> overall.    You can work around that by calling code from the properties,
> but that’s more work.
>
>  Given all that, I never found it worth the effort.   It’s far easier to
> simply put a bunch of hidden controls on a form, then unhide and
> move/resize and set properties as needed.
>
>  In general, you would only want to use CreateForm and CreateControl if
> you were writing some type of Wizard.
>
> Jim.
>
> -----Original Message-----
> From: AccessD On Behalf Of Bill Benson
> Sent: Tuesday, October 26, 2021 8:22 AM
> To: Access Developers discussion and problem solving <
> accessd at databaseadvisors.com>
> Cc: Jim Dettman <jimdettman at verizon.net>
> Subject: Re: [AccessD] Turn a recordset into an actual table
>
> Jim have you tried the method indicated here?
>
> https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2007/bb237827(v=office.12)?redirectedfrom=MSDN
>
> On Tue, Oct 26, 2021 at 7:49 AM Jim Dettman via AccessD <
> accessd at databaseadvisors.com> wrote:
>
> >
> >
> >  There is nothing like this anywhere in Access.
> >
> >  When it comes to forms, for a dynamic record set, you can:
> >
> > 1. Have a series of un-bound controls, check the record set fields
> > collection at the forms OnLoad, and then populate the controls as needed
> > hiding the ones that you don't want to use.
> > 2. Fill a temp table and point it to that.
> >
> >  For combo's and list boxes, you can
> >
> > 1. fill them manually by row and column with a call back function
> > 2. fill the recordsource with a value list
> > 3. Use a temp table and point it to that.
> >
> >    Unfortunately, Access doesn’t have a "put record set" command unlike
> > other products (i.e. VFP).    It has a GetRows() function to bring stuff
> > in, but not the corresponding Put.
> >
> > Jim.
> >
> <<snip>>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list