Dynamically creating table using form
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
Thank you for taking the time to report an issue.
What's wrong... Please write below.
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:
- 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
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.
Can someone explain why that would be more beneficial or prudent rather than creating a form directly from a table? Or, maybe I misunderstood and it doesn't really matter. Either way,
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)
But rather the form displayed contains a split form including order details.
Where is this form coming from? Does access somehow look at the last form created that has this table as a data source? Is this an option that can be turned off? I'm assuming it's possibleto have several forms for the same table as a data source?
from the Control Wizard. I have spent a long time creating this form - and have used quite a bit of code to create pop-up calendars, hint text, etc. so starting over is really not an option.
I did not realise that creating an unbound form was going to be such a nightmare!
My problem is - I am obviously unable to create new records or save any input data as the form is not linked/bound to a table. I was told I would need to create headings in a table and link each individual text box, combo box etc.
I also tried creating a new form w/fields from both tables after adding a relationship but the form will not allow me to add any new records. .
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?
It seems strange that you can set the ColumnOrder, ColumnWidth and ColumnHidden properties of a DataSheet view along with other DataSheet properties,
but the Frozen Columns can only be set using a RunCommand.