Dynamically creating table using form

I am trying to dynamically creating tables in Access 2010.
I would like to get the info from the user (Table name, number&type of columns)
and then creating the table using an SQL Query.

I know how to write the query, but I need help with passing the arguments to the query

Sponsored Links:

Related Topics

how to create unbound text-fields dynamically
How to create text-fields dynamically in a form using a VBA script.

my problem is: I have to create a multi dimensional control array (textfeilds) in a form to collect data and save it to a table, I tried several methods to create text-fields but couldn't make it.


Customisation of dynamically populated forms
I have a series of forms and subforms which cascade to dynamically create a checklist form of certain questions and answers dependant on the choices selected by the user.

This works by dynamically populating the form with whatever questions are required from the relevant tables

The check-list actually works quite well however I can only get the form to display 1 question at a time in single form view or all questions at a time for continuous form view. I do not want to use datasheet view

So therefore is there more customisation I can do with continuous view in code to show a certain number of questions per page for example, I don't like the scroll options I want to do everything with command buttons?


Customisation of dynamically populated forms
I have a series of forms and subforms which cascade to dynamically create a checklist form of certain questions and answers dependant on the choices selected by the user.

This works by dynamically populating the form with whatever questions are required from the relevant tables

The check-list actually works quite well however I can only get the form to display 1 question at a time in single form view or questions at a time for continuous form view. I do not want to use datasheet view

So therefore is there more customisation I can do with continuous view in code to show a certain number of questions per page for example, I don't like the scroll options I want to do everything with command buttons?


Problem dynamically removing controls
So now we've having tons of fun. edit, and remove records which relate to pedagogical items on a whim. There is no scenario where the number of these items will ever exceed 75.

These items are then used to create table columns on a separate table. This also means that the user entry form must be updated to reflect these fields.

Right now I'm able to pull the names and build the fields dynamically; however, I'm having a problem removing them:


Trying to use a macro to load a form dynamically
Windows Vista
Access 2007

This is my first post here and I need a little help. I'm trying to load a form dynamically and it doesn't seem to be working. I'm using the OpenForm macro and in the "Where condition" field I'm using '[Forms]![toddler_times]![student_id]=[Forms]![bathroom_chart]![bt_student_id]'. When the form loads it doesn't load any of the corresponding records (and yes there are records in the table


Covering Microsoft Access 2007 and 2010
- Brief overview of Relational Databases and Database Applications
- A Business Example
- Starting Microsoft Access
- Creating Table using Design View and Viewing Tables
- Viewing and Adding Data to a Table
- Creating Relationships Between tables
- Creating and Running Queries
- Single and Multiple Table Queries
- Creating and Running a Data Entry Form
- Creating a Single Table Form using the Wizard
- Review of Creating and Running a Data Entry Form
- Creating and Running a Report
- Creating a Single Table Report using the wizard
- Exercise: Creating a Single Table Report
- Review of Creating and Running a Report
- Creating and Running a Master/Detail Form
- Creating and Running a Switchboard


Hiding code
I have created specific functions (Public () as.) whose code is stored in table fields. When some of these specific functions are needed, I read the table content,dynamically create a new module, put the function code within, make an Eval() to get a result, and erase the dynamically created module.

My problem is that the VBA editor window is launched. Is there a way to prevent its display (by code or something else)?


How to calculate a field value dynamically in a table
I have two tables. Product table has "product price" column. OrderLine table has "quantity ordered" column. I have a column "LineItemCost" in OrderLine table. The value for line item cost is (product price*quantity ordered). This needs to be updated dynamically in the OrderLine table when each row is created. Could someone help me with this? I am totally stuck and I am not very familiar with Access


Hiding Code
I am working an a complex database.

I have created specific functions (Public <function name>() as.) whose code is stored in table fields. When some of these specific functions are needed, I read the table content, dynamically create a new module, put the function code within, make an Eval(<function name>) to get a result, and erase the dynamically created module.

My problem is that the VBA editor window is launched. Is there a way to prevent its display (by code or something else


Hiding code
I am working an a complex database.

I have created specific functions (Public <function name>() as.) whose code is stored in table fields. When some of these specific functions are needed, I read the table content, dynamically create a new module, put the function code within, make an Eval(<function name>) to get a result, and erase the dynamically created module.

My problem is that the VBA editor window is launched. Is there a way to prevent its display (by code or something else


Subform showing same record x times
I have a form which has a listbox containing my tables. From that, I can successfully select a table and click on a button. There is a sub-form that has a recordsource that is set to the selected table.

I am able to dynamically change the captions to the correct field names for the table and can successfully display data for the fields.

However, where a table has x records, I get x instances of the SAME record (the first on the table) rather than seeing x separate records. x happily changes according to the selected table.

I am displaying the data in a datasheet as the sub-form;am using Access 2007; it is an Access Project with a SQL Server 2008 back-end.

Here is the code fired by the button when the table has been chosen from the list box.


Is there a way to prevent a form from updating its content dynamically?
I was wondering if anyone knew of any way to prevent a form from updating its content against the tables dynamically?

I have some subroutines that check what values the fields have, and deactivates some of the fields based on the values.
(Every field that is not "0" is deactivated with on current).

The problem is that when two or more users are using the database, and one of them changes one of the fields, this changes suddenly appears in the other users' form as well.
This as I huge problem, as the fields doesn't get deactivated when the data appears in this way.

I would really need some way to prevent this from happening, so that the only time the form would update its info is when the record is changed or manually updated


Get column head name from list box?
Is there any way to return the column head (String) from a listbox?

I am building a section in a program for higher security users to add new fields to certain combo boxes. The list box is set as table/query and dynamically loads different tables based on user input.

I have everything else worked out except retrieving the column headings so I can dynamically save new values into tables. The tables do not have the same field names.


Get column head name from list box?
Is there any way to return the column head (String) from a listbox?

I am building a section in a program for higher security users to add new fields to certain combo boxes. The list box is set as table/query and dynamically loads different tables based on user input.

I have everything else worked out except retrieving the column headings so I can dynamically save new values into tables. The tables do not have the same field names


Display web content on a form.
Is there a way to get web content to be displayed on a form. I have a form, and on it I would like to have the weather.

I only want to be able to display the web table that holds the 5 day forecast along with the graphics. What kind of object do I need to create on the form to hold the content and how would I go about retrieving it? Obviously it would need to update dynamically.


Dynamically pass parameter from form to report
I'm working with Access 2010 and converted my Access project to an ADP file. In order for me to write a report which can accept a parameter I need to write a stored procedure - which I've done.

I've got a form with a command button to open the report, but my problem is that I would like the command button to dynamically pick up the active record id (record id currently displayed on the form) and pass that through to the report as a parameter instead of the report prompting me for the record id parameter.


Form Controls - dynamically creating
I have a form which I want to contain a list of people's names and for each person there are a set of textboxes which link to a querys in the background to show a drop down list.

On form load a query triggers to give me the current list of people and only that number of controls appears on the form. This is currently controlled through the textbox .visible = true property.

This is a very tedious method, and it would be limited to the number that I create on the form. I can't tell how many people are going to be returned on the query!

Is there a way I can create an array of textboxes on the fly and be able to reference them?

I hope I am explaining this properly :-)


Creating Export Specifications Using VBA
I need to automate the exporting of a number of access tables to text files. These tables are created dynamically by make-table queries and consist of several different combinations of fields; therefore I need to use a different export specification in each situation. Can anyone tell me if and how VBA can create new export specifications at run-time


Bind an Access Form's Record Source from an XML File at Runtime
Learn how to bind a form dynamically to a recordset created from an XML file. This simple application can be the starting point for a powerful solution for your customers and should be considered a part of your arsenal when developing Access application.
Dynamically setting the record source of a form is a handy way to make your forms more versatile. Likewise, programmatically importing an XML file to a table is a quick way to put that data to use. Combining the two operations hides a level of complexity from your users. This simple application is the starting point for an even more powerful solution for your customers and should be considered a part of your arsenal when developing Access application. (Access 2003)


Dynamically Add fields/controls to reports
I've not much experience with building reports in MsAccess. Can one dynamicall add fields/controls to reports from a vba module such as that linked to a form? I.e. do processing . . .set a sql string as a report's recordsource, then have the fields of the recordsource added or displayed in the report. I want to do this without having predefined the report content/format, etc.

Part of my reason for persuing this data display method is that there doesn't seem to be a grid control for displaying data on a form. So, how about a report that is built dynamically; can I do that?