Scrathing my head (1 Viewer)

Geoff Codd

Registered User.
Local time
Today, 04:08
Joined
Mar 6, 2002
Messages
190
Hi there,

I have the following Code

DoCmd.SetWarnings False

Dim vCircuit_Info
Dim vCircuit_Info_ID As Integer
Dim vCircuit_Info_Text As String
Dim LineNo As Integer

Set vCircuit_Info = CurrentDb().OpenRecordset("tblCircuit_Data")

Do Until vCircuit_Info.EOF

vReporting_ID = vCircuit_Info!ID
vReporting_Text = vCircuit_Info!Field1

If (Right(vReporting_Text, 18) = ">City: </font></b>") Then

LineNo = vReporting_ID + 1

End If

vCircuit_Info.MoveNext
Loop
vCircuit_Info.Close

DoCmd.SetWarnings True

End Function

Which looks for the value ">City: </font></b>" in a record and returns the record no, What I need to do is take the information form the next line (LineNo = vReporting_ID + 1)

But this is where I am stuck.

Any ideas appreciated.

Thanks
Geoff
 
Local time
Yesterday, 20:08
Joined
Aug 2, 2004
Messages
272
Not clear on your question. You state:

"What I need to do is take the information form (sic) the next line (LineNo = vReporting_ID + 1)..."

You will get that info on the next increment of your loop.

Are you trying to get the record number on the current increment for the NEXT record?

What is the value that you get with the current code?

Please elaborate... :confused: :confused:
 

WayneRyan

AWF VIP
Local time
Today, 04:08
Joined
Nov 19, 2002
Messages
7,122
Geoff,

You need to use the DMax function (DMax + 1) to assign the next number.

Use the Search Facility here and look for DMax, there are plenty of examples.

Wayne
 

Users who are viewing this thread

Top Bottom