I have the two attached databases and what I need to get done is create the information in the form into a table or query format. The parameters for each form are start segment, end segment, and timestamp.
The first attached file (11-3-05.zip) generates travel time from 5 minute intervals (12:00 am, 12:05 am, 12:10 am, etc.) from any one segment to any next segment. The segments in the file are roadway lengths along a particular roadway. There are 15 in all. The are 288 timestamps since 1440 minutes in a day broken into 5 minute intervals. After I specify what 2 segments I want to know the travel time to AND the timestamp, then this DB will step up the travel time to the next timestamp if the travel time gets over 5 minutes because you have already traveled for 5 minutes and you are now in the next timestamp if you are driving along this roadway. This is known as my actual travel time. (actual_tt)
The second DB (11-5-08-test.zip) is the same but instead of stepping up to the next timestamp as the first DB does this stays with whatever original timestamp was selected in the form. This is known as my posted travel time. (posted_tt)
So I need to combine these two into a query format where the finished query has the following field lists.
start segment l end segment l timestamp l actual_tt l posted_tt
The tricky thing I need is all combinations of all segments and at each timestamp, only going south though with segment 1 being the northen most segment and 15 being the southern most. I have the code attached to the buttons that steps up the travel time and doesn't step up the travel time, so really I just need probably another code that will combine all this in a query. Thank you for any assistance.
It looks like you're getting no response here. I'm going to tell you why I didn't respond when I first saw this:
* You can't create a query from a form.
* Queries cannot be formatted.
* Forms have controls or fields, not "parameters".
* There is no clarity in what you actually want to do.
* I have little time, not enough to go opening databases looking to see if I can interpret further what it is you actually want.
Question for you: What have you tried?? Perhaps that will give us a starting point on where it is we can help you.
If it is a simple matter of making a query that references tables from two separate databases, then perhaps you should have a look at table linking.
Sorry if this comes off as harsh, I don't mean to be, I just wanted to give you at least one intelligent response to your topic
I'm not really sure the best way to explain from posting but I will try from the beginning..
I have average travel times over certain roadways segments in a road network (segments 1-15 in my DB). The travel times are averaged over five minute intervals (the average travel time for segment [I]x[I] from 12:00 am-12:05 am, for 12:05 am-12:10 am, etc.) throughout the day from raw speed data that I have access to. So in my DB I have the average travel time over every five minute interval throughout the day for every segment.
The next part, which is the topic of my project, is the total travel time. So when I want to find total travel time from segment x to segment y then I must add all the travel times between those two segment to get total travel time. But the catch is, for example, if the total travel time is more than five minutes from segment x to segment y I have to know at what segment BECAUSE once the total travel time is over 5 minutes then i must now use the travel times associated with the next timestamp or five minute interval because the travel times associated with the previous five minute interval are useless since I already have a travel time of 5 miuntes. This is the stepping up of travel times I mentioned in the first post and this is called my actual travel time.
The posted travel time is the same as the above explanation but once the total travel time is over five minutes then it doesn't move to the next five minute interval.
Now I have this information in the two forms attached. But what I would like to do is have this information side by side in a query or table so that I can compare it, the actual and posted travel time, that is.
It will probably involve joining two tables but first I need to get the information from the form into a table so I can join them, but that is the part where I am stuck.
I'm hoping that I can just use the code that I have attached to the command button in the form to the VB editor but then I need to define it in the fieldlist section of the query and am not sure how to do that either.
An example of what I am looking for from the table will be, Every combination of segment to segment at every five minute interval.
Example: So total travel time from segment 1 to segment 2,3,4,5,6,7,8,9,10,11,12,13,14,15 at every 5 minute interval throughout the day (12:00 am, 12:05 am, 12:10 am, etc.)
Then total travel time from segment 2 to segment 3,4,5,6,7,8,9,10,11,12,13,14,15 at every 5 minute interval
etc. for posted and actual travel time for comparison
I hope that helped and thank you for the reply back, please let me know if explanation is not clear enough. Thank you
I had someone mentioned to me that I would have to just loop through all of the records for each scenario that you want and have an insert query to add a the record with the results at the end of the loop. But again, not sure how to do that either