[AccessD] Table does not open to first record

Charlotte Foust cfoust at infostatsystems.com
Mon Aug 22 10:48:25 CDT 2005


Sorry but I don't know what you mean by "pull a record in code".  Do you
mean that when you move to the first record in myds, it isn't the
earliest date in the table?  You don't indicate why myds1 is or how it's
populated either.

Charlotte Foust


-----Original Message-----
From: Kaup, Chester [mailto:Chester_Kaup at kindermorgan.com] 
Sent: Monday, August 22, 2005 8:30 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Table does not open to first record


I use the following code to open a table (myds) which is indexed on the
date field. When I pull a record in code it gets record 127. I tried a
movefirst command and the table still starts on record 127. Any ideas
what is happening appreciated.

 

Dim MyDb As Database, myds As Recordset

Set MyDb = CurrentDb()

Set myds = MyDb.OpenRecordset("tbl Produced HCPV% One Pattern",
dbOpenTable)

 

myds.MoveFirst

myds1.AddNew

    myds1.Fields(0) = myds.Fields(0)    'Date

    myds1.Fields(1) = myds.Fields(1)    'Pattern name

    myds1.Fields(2) = myds.Fields(2)    'Cum total injection

    myds1.Fields(3) = myds.Fields(3)    'Cum based HCPV%

    myds1.Fields(4) = myds.Fields(4)    'Derivative based HCPV%

myds1.Update

 

Chester Kaup

Engineering Technician

Kinder Morgan CO2 Company, LLP

Office (432) 688-3797

FAX (432) 688-3799

 

 

No trees were killed in the sending of this message. However a large
number of electrons were terribly inconvenienced.

 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list