Tables in form/Field

The Smiley One

New member
Local time
Today, 12:35
Joined
Nov 24, 2008
Messages
3
Im looking to setup a way to store a random table using a form.

I have an application in which people enter random data, and sometimes they would like to include an image or a small table. The columns/rows/headings/content of the table is not known in advance.

Example:
A user should (via a easy-to-use form) be able to write:
The machine must be able to serve beverages as shown in table below.

---------------------
|Beverage || Celcius |
----------------------
| Coke || 5 |
| Coffee || 90 |
| Soup || 60 |
----------------------

Any smart ideas anyone?
 
Im looking to setup a way to store a random table using a form.

I have an application in which people enter random data, and sometimes they would like to include an image or a small table. The columns/rows/headings/content of the table is not known in advance.

Example:
A user should (via a easy-to-use form) be able to write:
The machine must be able to serve beverages as shown in table below.

---------------------
|Beverage || Celcius |
----------------------
| Coke || 5 |
| Coffee || 90 |
| Soup || 60 |
----------------------

Any smart ideas anyone?

Assume the max# of columns is, say, 20. Create a table 20 columns wide. The first column is called RowNo. The other columns are named Col1, Col2, Col3, etc.

Create a subform as a datasheet. In rowNo1, the user will enter the column names. In each subsequent row, he will enter a row of data.


Then have code that reads this table as to create the "real" table based on it. The real table begins with one column called RowNo. To add columns,

DoCmd.RunSql "ALTER TABLE realTable ADD COLUMN Beverage TEXT"
 

Users who are viewing this thread

Back
Top Bottom