Adding records with an incrementing time

Lanason

Registered User.
Local time
Today, 03:30
Joined
Sep 12, 2003
Messages
258
I wan to create a table with a date / time starting at a specific time and then added a number of records with each record being a minute later than the first.

The starting point could be hard coded or by user entry and the loop would run for a certain number of times .....

Any ideas on how to do it ..... poss a macro :confused:
 
Generally, someone wanting to do this is thinking "spreadsheet" rather than "database" and therefore finds themselves in a real mess shortly thereafter. Access is very powerful but its power simply cannot be fully exercised as long as you think in two dimensions.

Particularly since you are dealing with time fields lacking dates, you are asking for one of the toughest possible situations. Date fields that don't contain dates just don't behave nicely.

Perhaps if you would try a different approach... why did you need to do this? What was your goal?
 
yep - here the thinking behind it

I am monitoring a machine that records the speed every minute when it is running. There are no records for when it is stopped. Excell is excelent when the timeframe is days to show the gaps but doesnt work with minutes.

So i decided to create two tables one with date and time for a week and the second with the record for those minutes when it was running. (Currently I have done a formula in excel and copied it down to get last record + 1 minute this is then used to populate the first table).

The merge of the two tables gives me a record every minute, with or without a speed - if I then copy back to Excell I can use the "category" rather than "time line" and get a bar graph for the week showing when the machine was running.

Does that help explain ???
 
Graphics with time are always a pain because of the way MS Graph treats times. No, make that "the way MS treats times." It ain't limited to Graph OR Access, trust me.

The last time I had to do anything at all like that, I generated my tables using VBA and a program loop that wrote to a table-type Recordset. Perhaps you should look into that approach. Look up recordset operations including .AddNew and .Update as a way to put desired information into a table.

Having said that, just remember that this is still flat-file thinking. Obviously so, since you are talking about graphing it using a specific 2-D format.

Access doesn't want to work this way, which is why it is so hard. Yet it surely is possible. I just don't know that you would want to run a query oddball enough to do the kind of updates you would need to do. And it WOULD be an oddball query.
 

Users who are viewing this thread

Back
Top Bottom