[AccessD] Table does not open to first record

Kaup, Chester Chester_Kaup at kindermorgan.com
Mon Aug 22 11:21:02 CDT 2005


Thanks that fixed it. Learn something new every day.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Andy Lacey
Sent: Monday, August 22, 2005 11:02 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Table does not open to first record

Chester
Try inserting

myds.index="yourindexname"

after the Open
--
Andy Lacey
http://www.minstersystems.co.uk




--------- Original Message --------
From: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
To: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
Subject: RE: [AccessD] Table does not open to first record
Date: 22/08/05 15:57


Myds is a table that has been populated in previous code one record at a
time. When I view my list of tables and double click on the table it
opens in ascending date order. When I open the table in code it does not
open on the first record which is the one with the earliest date. Hope
that makes sense.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte
Foust
Sent: Monday, August 22, 2005 10:48 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Table does not open to first record

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
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



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

________________________________________________
Message sent using UebiMiau 2.7.2

-- 
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