Results 1 to 2 of 2
  1. #1
    Join Date
    May 2003

    Unanswered: Previous Record Value

    I have a table containing two fields with over 400000 records imported from a report text file. The report basically grouped items so that when imported the db listed in Field 1 the group name and in Field 2 the members of Field 1.

    The problem is that Field 1 only lists a value in the first record of that group ... rather than for each group member. Is there anyway to write code that would populate null values in Field 1 based on the contents of the previous record?
    Last edited by ramonas; 11-03-03 at 13:53.

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    I'm a bit new to VB, my "native" language is delphi, but hopefully I can at least give you an idea or two. I would pull the current index off your recordset and evaluate it -1. Eg:

    Dim i As Integer

    i = Me.CurrentRecord - 1

    if Me.Recordset.Items(i).Value = (whatever criteria)
    Field1.Value = ""
    End If

    Again, I'm sorry I'm too new to really know the exact correct syntax here. But the general idea is in tact. If you can evaluate the recordset by index, then you should be good to go.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts