Insert Existing Fields to forms (1 Viewer)

jithb4u

New member
Local time
Today, 16:24
Joined
Aug 12, 2022
Messages
5
Hy all,
I want to insert existing fields from current table to the form.
I can do it manually in design view...
The field names can vary each time (i did it with import excel spreadsheet method)
But is there any chance to done it with vba code or macro??
Thanks in advance
 

Attachments

  • Untitled-1.jpg
    Untitled-1.jpg
    161.7 KB · Views: 70

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:24
Joined
May 7, 2009
Messages
19,230
you "drag" each fields inside the form.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:24
Joined
May 7, 2009
Messages
19,230
you don't need macro or vba.
just click on the any table or query.
then on the Ribbon, you click Create->Form.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:24
Joined
Feb 19, 2002
Messages
43,233
In an application, you wouldn't be adding objects on the fly. If your data source is variable, you need to do something to stabilize it.

When you are the designer, you can also have the wizard build the form in one of three views. Single record, multiple record, data sheet. If you select a table as the source, all fields from the table will be placed on the form. You can clean it up later if you need to. If you choose a query, then all fields from the query will be placed on the form. Therefore, unless you want all fields, you should probably start by creating a querydef and then letting the wizard work with that.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:24
Joined
Feb 28, 2001
Messages
27,150
If a vba code or macro can do this it will be more helpful. Is it possible?

There is a "wizard" that will build forms for you automatically. Creating it with a VBA module is CERTAINLY possible and CERTAINLY more trouble than it is worth, particularly since there is already a way to do it that does not require additional code.
 

Users who are viewing this thread

Top Bottom