Help with Code

S

Sousa

Hi All,

I am really new to access and am trying to figure out a way to write the following script, but am really struggling. If anybody on here could help mefigure it out or even give me a jump off point I would be really appreciative. I know its kind of weak to leave the code so incomplete, but I'm not really sure where else to go.
---------------------------------
Option Compare Database
Function DeleteDupTimes()

Dim rs1 As Recordset
Set rs1 = CurrentDb.OpenRecordset("test", dbOpenDynaset)

x = 0
rs1.MoveFirst 'MOVE TO THE FIRST RECORD
With rs1 'OPENS TABLE
Do Until .EOF
If column A of record 1 equals column A of record 2
and column B of record 1 equals column B of record 2
and column C of record 1 equals column C of record 2
then column E of record 2 equals column D of record 2 minus column D of record 1
'Then compare record 2 with record 3 in the same fashion and record 3 with 4 until the end of the table
-------------------------------------------------

Thanks for any help.

Sincerely,
Sousa
 
T

Tony Toews

I am really new to access and am trying to figure out a way to write the following script, but am really struggling. If anybody on here could help me figure it out or even give me a jump off point I would be really appreciative. I know its kind of weak to leave the code so incomplete, but I'm not really sure where else to go.

Try using two recordsets. Maybe open one as read only if that suits
so as to help avoid page locking issues.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top