Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I make a table when new data is entered? 1

Status
Not open for further replies.

learning2fly

Programmer
Jan 10, 2001
12
GB
Hello,

I am designing a database that takes input from the internet via a drumbeat interface. In the first instance this data is put into a table called 'data'.

The information is for selling electricity and contains the following fields : -

user name
time of entry
quantity to sell
price to sell at
risk level
time to deliver electricity (half-hour periods)

Now what I want to be able to do is make a table for every time slot that is available (a table for 10-10.30am, 10.30-11am etc.) So, when new data is entered from the web and appears in 'data' I want the database to:
1. check what delivery period the data refers to
2. if (a table already exists for that time period)
place the data entered in the corresponding table
else
create a table under the name of that
delivery period


I know the same data will be repeated in two different places. It is neccessary for me to have the data in a table for me to transfer it back to the net.

Is this possible using VBA and a make table query?

Thanks a million

Gordon


 
This is very poor design methodology. You do not need a separate table based on a time frame. Just include the time frames as part of your recordset and then query out what you need from there. You're asking for a database nightmare creating multiple tables. You'd have to create separate reports, forms and queries based on each table(ok, so you could change the recordsource for each on the fly but this is no way to run a database).
 
So I would just keep everything in the one database and sort it there according to the time period it refers to and then use a query from the web to get the information that I need?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top