PC Review


Reply
Thread Tools Rate Thread

Adding data to a table

 
 
=?Utf-8?B?U2NobWF0dA==?=
Guest
Posts: n/a
 
      27th Apr 2006
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
 
Reply With Quote
 
 
 
 
bob
Guest
Posts: n/a
 
      27th Apr 2006
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



 
Reply With Quote
 
=?Utf-8?B?U2NobWF0dA==?=
Guest
Posts: n/a
 
      27th Apr 2006
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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding data to table that retreives data from another table BZeyger Microsoft Access VBA Modules 2 5th Oct 2009 01:14 PM
Adding data from linked table and regular table to a form Mishanya Microsoft Access Getting Started 0 7th Sep 2008 12:48 AM
Getting Data From / Adding Data To Access DB Table ags5406 Microsoft VB .NET 2 12th Oct 2007 07:36 PM
Adding data to a Query w/o updating the table data John K Microsoft Access Queries 4 16th Jan 2004 06:09 PM
Adding data to the data table without adding a data marker to the chart BA Microsoft Excel Charting 2 19th Nov 2003 09:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:51 AM.