Listed below is the code I used to make the table. Perhaps this will help
clarify.
updstring = "Select * FROM MultiDayTable ORDER BY [Water_Year]"
'Establishes receiving table
Set myupd = mydb.OpenRecordset(updstring) 'Connects to receiving table
myupd.AddNew 'This routine adds records to receiving Table
myupd!Water_Year = WatYr
myupd!Sensor_ID = GageNum
'myupd!fulldate = fulldate
myupd!oneday = Format(nextdayrain(0), "###.00")
myupd!twodays = Format(nextdayrain(1), "###.00")
myupd!threedays = Format(nextdayrain(2), "###.00")
myupd!fourdays = Format(nextdayrain(3), "###.00")
myupd!fivedays = Format(nextdayrain(4), "###.00")
myupd!sixdays = Format(nextdayrain(5), "###.00")
myupd!eightdays = Format(nextdayrain(6), "###.00")
myupd!tendays = Format(nextdayrain(7), "###.00")
myupd!fifteendays = Format(nextdayrain(8), "###.00")
myupd!thirtydays = Format(nextdayrain(9), "###.00")
myupd!sixtydays = Format(nextdayrain(10), "###.00")
myupd!oneyear = Format(nextdayrain(11), "###.00")
myupd.Update 'Adds new data to MultiDayTable
"bob" wrote:
> Access tables do not have an "order' ...so your question is confusing..you
> can run a query against a table and the query can have an "order" if you so
> specify.
>
>
> Bob
>
>
> "Schmatt" <(E-Mail Removed)> wrote in message
> news:33323BED-8498-4415-95C3-(E-Mail Removed)...
> >I have some VBA calculations performed before using udate method to add
> > records to a table ordered by year. 90% of the time the program is run,
> > the
> > records add properly. Occassionaly, they are out of order. There is
> > nothing
> > consistent about the order or how many runs before malfunction. It seems
> > impossible to me. Any ideas.
> >
> > Thanks
>
>
>
|