Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    dragon_sun252 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    15

    Loop issue

    Im updates about 200 records from if then statements but I am having some loop problems. With this code here Acces is only updating the first record but if I take out currec.MoveNext im stuck in an ifanate loop.

    Option Compare Database
    Private Sub Command1_Click()
    Dim curdb As Database, currec As DAO.Recordset
    Set curdb = CurrentDb
    Set currec = curdb.OpenRecordset("APFT Rollup")
    Do Until currec.EOF


    - If then statements here
    currec.MoveNext
    Loop
    EndOfRecord:
    currec.Close
    End Sub

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Can you post your If/Then code
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    dragon_sun252 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    15
    Option Compare Database
    Private Sub Command1_Click()
    Dim curdb As Database, currec As DAO.Recordset
    Set curdb = CurrentDb
    Set currec = curdb.OpenRecordset("APFT Rollup")
    Do Until currec.EOF
    If IsNull(Me.Date7) = False Then
    Newpt.Value = Me.Date7.Value
    Else: IsNull (Me.Date7)
    Me.Newpt.Value = Me.Date6.Value
    End If
    If IsNull(Me.Date6) Then
    Me.Newpt.Value = Me.Date5.Value
    End If
    If IsNull(Me.Date5) Then
    Me.Newpt.Value = Me.Date4.Value
    End If
    If IsNull(Me.Date4) Then
    Me.Newpt.Value = Me.Date3.Value
    End If
    If IsNull(Me.Date3) Then
    Me.Newpt.Value = Me.Date2.Value
    End If
    If IsNull(Me.Date2) Then
    Me.Newpt.Value = Me.Date1.Value
    End If
    If IsNull(Me.Date1) Then
    Me.Newpt.Value = Me.Date.Value
    End If
    If IsNull(Me.Date) Then
    Me.Newpt.Value = "No APFT Record"
    End If
    If IsNull(Me.Score7) = False Then
    NewScore.Value = Me.Score7.Value
    Else: IsNull (Me.Score7)
    Me.NewScore.Value = Me.Score6.Value
    End If
    If IsNull(Me.Score6) Then
    Me.NewScore.Value = Me.Score5.Value
    End If
    If IsNull(Me.Score5) Then
    Me.NewScore.Value = Me.Score4.Value
    End If
    If IsNull(Me.Score4) Then
    Me.NewScore.Value = Me.Score3.Value
    End If
    If IsNull(Me.Score3) Then
    Me.NewScore.Value = Me.Score2.Value
    End If
    If IsNull(Me.Score2) Then
    Me.NewScore.Value = Me.Score1.Value
    End If
    If IsNull(Me.Score1) Then
    Me.NewScore.Value = Me.Score.Value
    End If
    If IsNull(Me.Score) Then
    Me.NewScore.Value = "No Score"
    End If
    If IsNull(Me.NOTES7) = False Then
    NewNotes.Value = Me.NOTES7.Value
    Else: IsNull (Me.NOTES7)
    Me.NewNotes.Value = Me.NOTES6.Value
    End If
    If IsNull(Me.NOTES6) Then
    Me.NewNotes.Value = Me.NOTES5.Value
    End If
    If IsNull(Me.NOTES5) Then
    Me.NewNotes.Value = Me.NOTES4.Value
    End If
    If IsNull(Me.NOTES4) Then
    Me.NewNotes.Value = Me.NOTES3.Value
    End If
    If IsNull(Me.NOTES3) Then
    Me.NewNotes.Value = Me.NOTES2.Value
    End If
    If IsNull(Me.NOTES2) Then
    Me.NewNotes.Value = Me.NOTES1.Value
    End If
    If IsNull(Me.NOTES1) Then
    Me.NewNotes.Value = Me.NOTES.Value
    End If
    If IsNull(Me.NOTES) Then
    Me.NewNotes.Value = "No Notes"
    End If
    If IsNull(Me.TYPE7) = False Then
    NewTYPE.Value = Me.TYPE7.Value
    Else: IsNull (Me.TYPE7)
    Me.NewTYPE.Value = Me.TYPE6.Value
    End If
    If IsNull(Me.TYPE6) Then
    Me.NewTYPE.Value = Me.TYPE5.Value
    End If
    If IsNull(Me.TYPE5) Then
    Me.NewTYPE.Value = Me.TYPE4.Value
    End If
    If IsNull(Me.TYPE4) Then
    Me.NewTYPE.Value = Me.TYPE3.Value
    End If
    If IsNull(Me.TYPE3) Then
    Me.NewTYPE.Value = Me.TYPE2.Value
    End If
    If IsNull(Me.TYPE2) Then
    Me.NewTYPE.Value = Me.TYPE1.Value
    End If
    If IsNull(Me.TYPE1) Then
    Me.NewTYPE.Value = Me.TYPE.Value
    End If
    If IsNull(Me.TYPE) Then
    Me.NewTYPE.Value = "No Type"
    End If
    If IsNull(Me.ALT_TIME7) = False Then
    NewALT_TIME.Value = Me.ALT_TIME7.Value
    Else: IsNull (Me.ALT_TIME7)
    Me.NewALT_TIME.Value = Me.ALT_TIME6.Value
    End If
    If IsNull(Me.ALT_TIME6) Then
    Me.NewALT_TIME.Value = Me.ALT_TIME5.Value
    End If
    If IsNull(Me.ALT_TIME5) Then
    Me.NewALT_TIME.Value = Me.ALT_TIME4.Value
    End If
    If IsNull(Me.ALT_TIME4) Then
    Me.NewALT_TIME.Value = Me.ALT_TIME3.Value
    End If
    If IsNull(Me.ALT_TIME3) Then
    Me.NewALT_TIME.Value = Me.ALT_TIME2.Value
    End If
    If IsNull(Me.ALT_TIME2) Then
    Me.NewALT_TIME.Value = Me.ALT_TIME1.Value
    End If
    If IsNull(Me.ALT_TIME1) Then
    Me.NewALT_TIME.Value = Me.ALT_TIME.Value
    End If
    If IsNull(Me.ALT_TIME) Then
    Me.NewALT_TIME.Value = "No Score"
    End If
    If IsNull(Me.RS7) = False Then
    NewRS.Value = Me.RS7.Value
    Else: IsNull (Me.RS7)
    Me.NewRS.Value = Me.RS6.Value
    End If
    If IsNull(Me.RS6) Then
    Me.NewRS.Value = Me.RS5.Value
    End If
    If IsNull(Me.RS5) Then
    Me.NewRS.Value = Me.RS4.Value
    End If
    If IsNull(Me.RS4) Then
    Me.NewRS.Value = Me.RS3.Value
    End If
    If IsNull(Me.RS3) Then
    Me.NewRS.Value = Me.RS2.Value
    End If
    If IsNull(Me.RS2) Then
    Me.NewRS.Value = Me.RS1.Value
    End If
    If IsNull(Me.RS1) Then
    Me.NewRS.Value = Me.RS.Value
    End If
    If IsNull(Me.RS) Then
    Me.NewRS.Value = ""
    End If
    If IsNull(Me.PU_S7) = False Then
    NewPU_S.Value = Me.PU_S7.Value
    Else: IsNull (Me.PU_S7)
    Me.NewPU_S.Value = Me.PU_S6.Value
    End If
    If IsNull(Me.PU_S6) Then
    Me.NewPU_S.Value = Me.PU_S5.Value
    End If
    If IsNull(Me.PU_S5) Then
    Me.NewPU_S.Value = Me.PU_S4.Value
    End If
    If IsNull(Me.PU_S4) Then
    Me.NewPU_S.Value = Me.PU_S3.Value
    End If
    If IsNull(Me.PU_S3) Then
    Me.NewPU_S.Value = Me.PU_S2.Value
    End If
    If IsNull(Me.PU_S2) Then
    Me.NewPU_S.Value = Me.PU_S1.Value
    End If
    If IsNull(Me.PU_S1) Then
    Me.NewPU_S.Value = Me.PU_S.Value
    End If
    If IsNull(Me.PU_S) Then
    Me.NewPU_S.Value = ""
    End If
    If IsNull(Me.ALT_EVENT7) = False Then
    NewALT_EVENT.Value = Me.ALT_EVENT7.Value
    Else: IsNull (Me.ALT_EVENT7)
    Me.NewALT_EVENT.Value = Me.ALT_EVENT6.Value
    End If
    If IsNull(Me.ALT_EVENT6) Then
    Me.NewALT_EVENT.Value = Me.ALT_EVENT5.Value
    End If
    If IsNull(Me.ALT_EVENT5) Then
    Me.NewALT_EVENT.Value = Me.ALT_EVENT4.Value
    End If
    If IsNull(Me.ALT_EVENT4) Then
    Me.NewALT_EVENT.Value = Me.ALT_EVENT3.Value
    End If
    If IsNull(Me.ALT_EVENT3) Then
    Me.NewALT_EVENT.Value = Me.ALT_EVENT2.Value
    End If
    If IsNull(Me.ALT_EVENT2) Then
    Me.NewALT_EVENT.Value = Me.ALT_EVENT1.Value
    End If
    If IsNull(Me.ALT_EVENT1) Then
    Me.NewALT_EVENT.Value = Me.ALT_EVENT.Value
    End If
    If IsNull(Me.ALT_EVENT) Then
    Me.NewALT_EVENT.Value = "N/A"
    End If
    If IsNull(Me.SU_S7) = False Then
    NewSU_S.Value = Me.SU_S7.Value
    Else: IsNull (Me.SU_S7)
    Me.NewSU_S.Value = Me.SU_S6.Value
    End If
    If IsNull(Me.SU_S6) Then
    Me.NewSU_S.Value = Me.SU_S5.Value
    End If
    If IsNull(Me.SU_S5) Then
    Me.NewSU_S.Value = Me.SU_S4.Value
    End If
    If IsNull(Me.SU_S4) Then
    Me.NewSU_S.Value = Me.SU_S3.Value
    End If
    If IsNull(Me.SU_S3) Then
    Me.NewSU_S.Value = Me.SU_S2.Value
    End If
    If IsNull(Me.SU_S2) Then
    Me.NewSU_S.Value = Me.SU_S1.Value
    End If
    If IsNull(Me.SU_S1) Then
    Me.NewSU_S.Value = Me.SU_S.Value
    End If
    If IsNull(Me.SU_S) Then
    Me.NewSU_S.Value = ""
    End If
    If IsNull(Me.AGE7) = False Then
    NEWAGE.Value = Me.AGE7.Value
    Else: IsNull (Me.AGE7)
    Me.NEWAGE.Value = Me.AGE6.Value
    End If
    If IsNull(Me.AGE6) Then
    Me.NEWAGE.Value = Me.AGE5.Value
    End If
    If IsNull(Me.AGE5) Then
    Me.NEWAGE.Value = Me.AGE4.Value
    End If
    If IsNull(Me.AGE4) Then
    Me.NEWAGE.Value = Me.AGE3.Value
    End If
    If IsNull(Me.AGE3) Then
    Me.NEWAGE.Value = Me.AGE2.Value
    End If
    If IsNull(Me.AGE2) Then
    Me.NEWAGE.Value = Me.AGE1.Value
    End If
    If IsNull(Me.AGE1) Then
    Me.NEWAGE.Value = Me.AGE.Value
    End If
    If IsNull(Me.AGE) Then
    Me.NEWAGE.Value = "No DOB Entered"
    End If
    If IsNull(Me.PASS_ALT7) = False Then
    New_ALT_PASS.Value = Me.PASS_ALT7.Value
    Else: IsNull (Me.PASS_ALT7)
    Me.New_ALT_PASS.Value = Me.PASS_ALT6.Value
    End If
    If IsNull(Me.PASS_ALT6) Then
    Me.New_ALT_PASS.Value = Me.PASS_ALT5.Value
    End If
    If IsNull(Me.PASS_ALT5) Then
    Me.New_ALT_PASS.Value = Me.PASS_ALT4.Value
    End If
    If IsNull(Me.PASS_ALT4) Then
    Me.New_ALT_PASS.Value = Me.PASS_ALT3.Value
    End If
    If IsNull(Me.PASS_ALT3) Then
    Me.New_ALT_PASS.Value = Me.PASS_ALT2.Value
    End If
    If IsNull(Me.PASS_ALT2) Then
    Me.New_ALT_PASS.Value = Me.PASS_ALT1.Value
    End If
    If IsNull(Me.PASS_ALT1) Then
    Me.New_ALT_PASS.Value = Me.PASS_ALT.Value
    End If
    If IsNull(Me.PASS_ALT) Then
    Me.New_ALT_PASS.Value = "N/A"
    End If
    currec.MoveNext
    Loop
    EndOfRecord:
    currec.Close
    End Sub

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Can you explain a little more about what you are actually trying to do. Your If/Then statements are very long, so I have not studied them too closely but as far as I can see, what you are actually doing is opening a recordset that you loop through but don't actually use.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    dragon_sun252 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    15
    Basicly it is finding the newest of each field and saving it to a "New field"

  6. #6
    dragon_sun252 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    15
    If one field is blank in moves to the next and so on

  7. #7
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by dragon_sun252 View Post
    If one field is blank in moves to the next and so on
    As far as I can see and understand the only things that will change are the values of some controls on the current record of the form which has the button, from which the code runs but you are not changing the form record, nor are you using or changing any of the values stored in the recordset. All you are doing is this:
    1) opening the recordset
    2)changing some of the values in the current record of your form
    3)moving to the next record in the recordset
    4)running all those If/Then statements again on the same form record
    then you are just repeating steps 3 and 4 untill you reach the end of the recordset.

    So, as I asked earlier, can you tell us more of what you are trying to do.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  8. #8
    dragon_sun252 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    15
    It is a coninues form that I am trying to run the if then on all the records and all the fields on the form are bound to a table.
    So I want to open one record
    apply the if thens to that record
    move to next record
    and repeate until all the records have had the if thens ran on them

  9. #9
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    So is the Record Source of your form the same table/query (APFT Rollup) that is used in the recordset which you called currec
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  10. #10
    dragon_sun252 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    15
    Yes that is currect

  11. #11
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    This is UNTESTED so MAKE A BACKUP

    Then try this:

    Private Sub Command1_Click()
    Dim curdb As Database, currec As DAO.Recordset
    Set curdb = CurrentDb
    Set currec = curdb.OpenRecordset("APFT Rollup")
    With currec
    .Edit
    Do Until currec.EOF
    If IsNull(.Date7) = False Then
    Newpt.Value = .Date7.Value
    Else: IsNull (.Date7)
    .Newpt.Value = .Date6.Value
    End If
    If IsNull(.Date6) Then
    .Newpt.Value = .Date5.Value
    End If
    If IsNull(.Date5) Then
    .Newpt.Value = .Date4.Value
    End If
    If IsNull(.Date4) Then
    .Newpt.Value = .Date3.Value
    End If
    If IsNull(.Date3) Then
    .Newpt.Value = .Date2.Value
    End If
    If IsNull(.Date2) Then
    .Newpt.Value = .Date1.Value
    End If
    If IsNull(.Date1) Then
    .Newpt.Value = .Date.Value
    End If
    If IsNull(.Date) Then
    .Newpt.Value = "No APFT Record"
    End If
    If IsNull(.Score7) = False Then
    NewScore.Value = .Score7.Value
    Else: IsNull (.Score7)
    .NewScore.Value = .Score6.Value
    End If
    If IsNull(.Score6) Then
    .NewScore.Value = .Score5.Value
    End If
    If IsNull(.Score5) Then
    .NewScore.Value = .Score4.Value
    End If
    If IsNull(.Score4) Then
    .NewScore.Value = .Score3.Value
    End If
    If IsNull(.Score3) Then
    .NewScore.Value = .Score2.Value
    End If
    If IsNull(.Score2) Then
    .NewScore.Value = .Score1.Value
    End If
    If IsNull(.Score1) Then
    .NewScore.Value = .Score.Value
    End If
    If IsNull(.Score) Then
    .NewScore.Value = "No Score"
    End If
    If IsNull(.NOTES7) = False Then
    NewNotes.Value = .NOTES7.Value
    Else: IsNull (.NOTES7)
    .NewNotes.Value = .NOTES6.Value
    End If
    If IsNull(.NOTES6) Then
    .NewNotes.Value = .NOTES5.Value
    End If
    If IsNull(.NOTES5) Then
    .NewNotes.Value = .NOTES4.Value
    End If
    If IsNull(.NOTES4) Then
    .NewNotes.Value = .NOTES3.Value
    End If
    If IsNull(.NOTES3) Then
    .NewNotes.Value = .NOTES2.Value
    End If
    If IsNull(.NOTES2) Then
    .NewNotes.Value = .NOTES1.Value
    End If
    If IsNull(.NOTES1) Then
    .NewNotes.Value = .NOTES.Value
    End If
    If IsNull(.NOTES) Then
    .NewNotes.Value = "No Notes"
    End If
    If IsNull(.TYPE7) = False Then
    NewTYPE.Value = .TYPE7.Value
    Else: IsNull (.TYPE7)
    .NewTYPE.Value = .TYPE6.Value
    End If
    If IsNull(.TYPE6) Then
    .NewTYPE.Value = .TYPE5.Value
    End If
    If IsNull(.TYPE5) Then
    .NewTYPE.Value = .TYPE4.Value
    End If
    If IsNull(.TYPE4) Then
    .NewTYPE.Value = .TYPE3.Value
    End If
    If IsNull(.TYPE3) Then
    .NewTYPE.Value = .TYPE2.Value
    End If
    If IsNull(.TYPE2) Then
    .NewTYPE.Value = .TYPE1.Value
    End If
    If IsNull(.TYPE1) Then
    .NewTYPE.Value = .Type.Value
    End If
    If IsNull(.Type) Then
    .NewTYPE.Value = "No Type"
    End If
    If IsNull(.ALT_TIME7) = False Then
    NewALT_TI.Value = .ALT_TIME7.Value
    Else: IsNull (.ALT_TIME7)
    .NewALT_TI.Value = .ALT_TIME6.Value
    End If
    If IsNull(.ALT_TIME6) Then
    .NewALT_TI.Value = .ALT_TIME5.Value
    End If
    If IsNull(.ALT_TIME5) Then
    .NewALT_TI.Value = .ALT_TIME4.Value
    End If
    If IsNull(.ALT_TIME4) Then
    .NewALT_TI.Value = .ALT_TIME3.Value
    End If
    If IsNull(.ALT_TIME3) Then
    .NewALT_TI.Value = .ALT_TIME2.Value
    End If
    If IsNull(.ALT_TIME2) Then
    .NewALT_TI.Value = .ALT_TIME1.Value
    End If
    If IsNull(.ALT_TIME1) Then
    .NewALT_TI.Value = .ALT_TI.Value
    End If
    If IsNull(.ALT_TIME) Then
    .NewALT_TI.Value = "No Score"
    End If
    If IsNull(.RS7) = False Then
    NewRS.Value = .RS7.Value
    Else: IsNull (.RS7)
    .NewRS.Value = .RS6.Value
    End If
    If IsNull(.RS6) Then
    .NewRS.Value = .RS5.Value
    End If
    If IsNull(.RS5) Then
    .NewRS.Value = .RS4.Value
    End If
    If IsNull(.RS4) Then
    .NewRS.Value = .RS3.Value
    End If
    If IsNull(.RS3) Then
    .NewRS.Value = .RS2.Value
    End If
    If IsNull(.RS2) Then
    .NewRS.Value = .RS1.Value
    End If
    If IsNull(.RS1) Then
    .NewRS.Value = .RS.Value
    End If
    If IsNull(.RS) Then
    .NewRS.Value = ""
    End If
    If IsNull(.PU_S7) = False Then
    NewPU_S.Value = .PU_S7.Value
    Else: IsNull (.PU_S7)
    .NewPU_S.Value = .PU_S6.Value
    End If
    If IsNull(.PU_S6) Then
    .NewPU_S.Value = .PU_S5.Value
    End If
    If IsNull(.PU_S5) Then
    .NewPU_S.Value = .PU_S4.Value
    End If
    If IsNull(.PU_S4) Then
    .NewPU_S.Value = .PU_S3.Value
    End If
    If IsNull(.PU_S3) Then
    .NewPU_S.Value = .PU_S2.Value
    End If
    If IsNull(.PU_S2) Then
    .NewPU_S.Value = .PU_S1.Value
    End If
    If IsNull(.PU_S1) Then
    .NewPU_S.Value = .PU_S.Value
    End If
    If IsNull(.PU_S) Then
    .NewPU_S.Value = ""
    End If
    If IsNull(.ALT_EVENT7) = False Then
    NewALT_EVENT.Value = .ALT_EVENT7.Value
    Else: IsNull (.ALT_EVENT7)
    .NewALT_EVENT.Value = .ALT_EVENT6.Value
    End If
    If IsNull(.ALT_EVENT6) Then
    .NewALT_EVENT.Value = .ALT_EVENT5.Value
    End If
    If IsNull(.ALT_EVENT5) Then
    .NewALT_EVENT.Value = .ALT_EVENT4.Value
    End If
    If IsNull(.ALT_EVENT4) Then
    .NewALT_EVENT.Value = .ALT_EVENT3.Value
    End If
    If IsNull(.ALT_EVENT3) Then
    .NewALT_EVENT.Value = .ALT_EVENT2.Value
    End If
    If IsNull(.ALT_EVENT2) Then
    .NewALT_EVENT.Value = .ALT_EVENT1.Value
    End If
    If IsNull(.ALT_EVENT1) Then
    .NewALT_EVENT.Value = .ALT_EVENT.Value
    End If
    If IsNull(.ALT_EVENT) Then
    .NewALT_EVENT.Value = "N/A"
    End If
    If IsNull(.SU_S7) = False Then
    NewSU_S.Value = .SU_S7.Value
    Else: IsNull (.SU_S7)
    .NewSU_S.Value = .SU_S6.Value
    End If
    If IsNull(.SU_S6) Then
    .NewSU_S.Value = .SU_S5.Value
    End If
    If IsNull(.SU_S5) Then
    .NewSU_S.Value = .SU_S4.Value
    End If
    If IsNull(.SU_S4) Then
    .NewSU_S.Value = .SU_S3.Value
    End If
    If IsNull(.SU_S3) Then
    .NewSU_S.Value = .SU_S2.Value
    End If
    If IsNull(.SU_S2) Then
    .NewSU_S.Value = .SU_S1.Value
    End If
    If IsNull(.SU_S1) Then
    .NewSU_S.Value = .SU_S.Value
    End If
    If IsNull(.SU_S) Then
    .NewSU_S.Value = ""
    End If
    If IsNull(.AGE7) = False Then
    NEWAGE.Value = .AGE7.Value
    Else: IsNull (.AGE7)
    .NEWAGE.Value = .AGE6.Value
    End If
    If IsNull(.AGE6) Then
    .NEWAGE.Value = .AGE5.Value
    End If
    If IsNull(.AGE5) Then
    .NEWAGE.Value = .AGE4.Value
    End If
    If IsNull(.AGE4) Then
    .NEWAGE.Value = .AGE3.Value
    End If
    If IsNull(.AGE3) Then
    .NEWAGE.Value = .AGE2.Value
    End If
    If IsNull(.AGE2) Then
    .NEWAGE.Value = .AGE1.Value
    End If
    If IsNull(.AGE1) Then
    .NEWAGE.Value = .AGE.Value
    End If
    If IsNull(.AGE) Then
    .NEWAGE.Value = "No DOB Entered"
    End If
    If IsNull(.PASS_ALT7) = False Then
    New_ALT_PASS.Value = .PASS_ALT7.Value
    Else: IsNull (.PASS_ALT7)
    .New_ALT_PASS.Value = .PASS_ALT6.Value
    End If
    If IsNull(.PASS_ALT6) Then
    .New_ALT_PASS.Value = .PASS_ALT5.Value
    End If
    If IsNull(.PASS_ALT5) Then
    .New_ALT_PASS.Value = .PASS_ALT4.Value
    End If
    If IsNull(.PASS_ALT4) Then
    .New_ALT_PASS.Value = .PASS_ALT3.Value
    End If
    If IsNull(.PASS_ALT3) Then
    .New_ALT_PASS.Value = .PASS_ALT2.Value
    End If
    If IsNull(.PASS_ALT2) Then
    .New_ALT_PASS.Value = .PASS_ALT1.Value
    End If
    If IsNull(.PASS_ALT1) Then
    .New_ALT_PASS.Value = .PASS_ALT.Value
    End If
    If IsNull(.PASS_ALT) Then
    .New_ALT_PASS.Value = "N/A"
    End If
    currec.MoveNext
    .Update
    Loop
    EndOfRecord:
    currec.Close
    Me.Requery
    End Sub
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  12. #12
    dragon_sun252 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    15
    Newpt.Value = Date6.Value - Getting cannot assign value

  13. #13
    dragon_sun252 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    15
    Also here is the update on (had to remove the dots from where the me's where removed and had to add [] to date and type

    Private Sub Command1_Click()
    Dim curdb As Database, currec As DAO.Recordset
    Set curdb = CurrentDb
    Set currec = curdb.OpenRecordset("APFT Rollup")
    With currec
    .Edit
    Do Until currec.EOF
    If IsNull(Date7) = False Then
    Newpt.Value = Date7.Value
    Else: IsNull (Date7)
    Newpt.Value = Date6.Value
    End If
    If IsNull(Date6) Then
    Newpt.Value = Date5.Value
    End If
    If IsNull(Date5) Then
    Newpt.Value = Date4.Value
    End If
    If IsNull(Date4) Then
    Newpt.Value = Date3.Value
    End If
    If IsNull(Date3) Then
    Newpt.Value = Date2.Value
    End If
    If IsNull(Date2) Then
    Newpt.Value = Date1.Value
    End If
    If IsNull(Date1) Then
    Newpt.Value = [Date].Value
    End If
    If IsNull(Date) Then
    Newpt.Value = "No APFT Record"
    End If
    If IsNull(Score7) = False Then
    NewScore.Value = Score7.Value
    Else: IsNull (Score7)
    NewScore.Value = Score6.Value
    End If
    If IsNull(Score6) Then
    NewScore.Value = Score5.Value
    End If
    If IsNull(Score5) Then
    NewScore.Value = Score4.Value
    End If
    If IsNull(Score4) Then
    NewScore.Value = Score3.Value
    End If
    If IsNull(Score3) Then
    NewScore.Value = Score2.Value
    End If
    If IsNull(Score2) Then
    NewScore.Value = Score1.Value
    End If
    If IsNull(Score1) Then
    NewScore.Value = Score.Value
    End If
    If IsNull(Score) Then
    NewScore.Value = "No Score"
    End If
    If IsNull(NOTES7) = False Then
    NewNotes.Value = NOTES7.Value
    Else: IsNull (NOTES7)
    NewNotes.Value = NOTES6.Value
    End If
    If IsNull(NOTES6) Then
    NewNotes.Value = NOTES5.Value
    End If
    If IsNull(NOTES5) Then
    NewNotes.Value = NOTES4.Value
    End If
    If IsNull(NOTES4) Then
    NewNotes.Value = NOTES3.Value
    End If
    If IsNull(NOTES3) Then
    NewNotes.Value = NOTES2.Value
    End If
    If IsNull(NOTES2) Then
    NewNotes.Value = NOTES1.Value
    End If
    If IsNull(NOTES1) Then
    NewNotes.Value = NOTES.Value
    End If
    If IsNull(NOTES) Then
    NewNotes.Value = "No Notes"
    End If
    If IsNull(TYPE7) = False Then
    NewTYPE.Value = TYPE7.Value
    Else: IsNull (TYPE7)
    NewTYPE.Value = TYPE6.Value
    End If
    If IsNull(TYPE6) Then
    NewTYPE.Value = TYPE5.Value
    End If
    If IsNull(TYPE5) Then
    NewTYPE.Value = TYPE4.Value
    End If
    If IsNull(TYPE4) Then
    NewTYPE.Value = TYPE3.Value
    End If
    If IsNull(TYPE3) Then
    NewTYPE.Value = TYPE2.Value
    End If
    If IsNull(TYPE2) Then
    NewTYPE.Value = TYPE1.Value
    End If
    If IsNull(TYPE1) Then
    NewTYPE.Value = [TYPE].Value
    End If
    If IsNull([TYPE]) Then
    NewTYPE.Value = "No Type"
    End If
    If IsNull(ALT_TIME7) = False Then
    NewALT_TIValue = ALT_TIME7.Value
    Else: IsNull (ALT_TIME7)
    NewALT_TIValue = ALT_TIME6.Value
    End If
    If IsNull(ALT_TIME6) Then
    NewALT_TIValue = ALT_TIME5.Value
    End If
    If IsNull(ALT_TIME5) Then
    NewALT_TIValue = ALT_TIME4.Value
    End If
    If IsNull(ALT_TIME4) Then
    NewALT_TIValue = ALT_TIME3.Value
    End If
    If IsNull(ALT_TIME3) Then
    NewALT_TIValue = ALT_TIME2.Value
    End If
    If IsNull(ALT_TIME2) Then
    NewALT_TIValue = ALT_TIME1.Value
    End If
    If IsNull(ALT_TIME1) Then
    NewALT_TIValue = ALT_TIValue
    End If
    If IsNull(ALT_TIME) Then
    NewALT_TIValue = "No Score"
    End If
    If IsNull(RS7) = False Then
    NewRS.Value = RS7.Value
    Else: IsNull (RS7)
    NewRS.Value = RS6.Value
    End If
    If IsNull(RS6) Then
    NewRS.Value = RS5.Value
    End If
    If IsNull(RS5) Then
    NewRS.Value = RS4.Value
    End If
    If IsNull(RS4) Then
    NewRS.Value = RS3.Value
    End If
    If IsNull(RS3) Then
    NewRS.Value = RS2.Value
    End If
    If IsNull(RS2) Then
    NewRS.Value = RS1.Value
    End If
    If IsNull(RS1) Then
    NewRS.Value = RS.Value
    End If
    If IsNull(RS) Then
    NewRS.Value = ""
    End If
    If IsNull(PU_S7) = False Then
    NewPU_S.Value = PU_S7.Value
    Else: IsNull (PU_S7)
    NewPU_S.Value = PU_S6.Value
    End If
    If IsNull(PU_S6) Then
    NewPU_S.Value = PU_S5.Value
    End If
    If IsNull(PU_S5) Then
    NewPU_S.Value = PU_S4.Value
    End If
    If IsNull(PU_S4) Then
    NewPU_S.Value = PU_S3.Value
    End If
    If IsNull(PU_S3) Then
    NewPU_S.Value = PU_S2.Value
    End If
    If IsNull(PU_S2) Then
    NewPU_S.Value = PU_S1.Value
    End If
    If IsNull(PU_S1) Then
    NewPU_S.Value = PU_S.Value
    End If
    If IsNull(PU_S) Then
    NewPU_S.Value = ""
    End If
    If IsNull(ALT_EVENT7) = False Then
    NewALT_EVENT.Value = ALT_EVENT7.Value
    Else: IsNull (ALT_EVENT7)
    NewALT_EVENT.Value = ALT_EVENT6.Value
    End If
    If IsNull(ALT_EVENT6) Then
    NewALT_EVENT.Value = ALT_EVENT5.Value
    End If
    If IsNull(ALT_EVENT5) Then
    NewALT_EVENT.Value = ALT_EVENT4.Value
    End If
    If IsNull(ALT_EVENT4) Then
    NewALT_EVENT.Value = ALT_EVENT3.Value
    End If
    If IsNull(ALT_EVENT3) Then
    NewALT_EVENT.Value = ALT_EVENT2.Value
    End If
    If IsNull(ALT_EVENT2) Then
    NewALT_EVENT.Value = ALT_EVENT1.Value
    End If
    If IsNull(ALT_EVENT1) Then
    NewALT_EVENT.Value = ALT_EVENT.Value
    End If
    If IsNull(ALT_EVENT) Then
    NewALT_EVENT.Value = "N/A"
    End If
    If IsNull(SU_S7) = False Then
    NewSU_S.Value = SU_S7.Value
    Else: IsNull (SU_S7)
    NewSU_S.Value = SU_S6.Value
    End If
    If IsNull(SU_S6) Then
    NewSU_S.Value = SU_S5.Value
    End If
    If IsNull(SU_S5) Then
    NewSU_S.Value = SU_S4.Value
    End If
    If IsNull(SU_S4) Then
    NewSU_S.Value = SU_S3.Value
    End If
    If IsNull(SU_S3) Then
    NewSU_S.Value = SU_S2.Value
    End If
    If IsNull(SU_S2) Then
    NewSU_S.Value = SU_S1.Value
    End If
    If IsNull(SU_S1) Then
    NewSU_S.Value = SU_S.Value
    End If
    If IsNull(SU_S) Then
    NewSU_S.Value = ""
    End If
    If IsNull(AGE7) = False Then
    NEWAGE.Value = AGE7.Value
    Else: IsNull (AGE7)
    NEWAGE.Value = AGE6.Value
    End If
    If IsNull(AGE6) Then
    NEWAGE.Value = AGE5.Value
    End If
    If IsNull(AGE5) Then
    NEWAGE.Value = AGE4.Value
    End If
    If IsNull(AGE4) Then
    NEWAGE.Value = AGE3.Value
    End If
    If IsNull(AGE3) Then
    NEWAGE.Value = AGE2.Value
    End If
    If IsNull(AGE2) Then
    NEWAGE.Value = AGE1.Value
    End If
    If IsNull(AGE1) Then
    NEWAGE.Value = AGE.Value
    End If
    If IsNull(AGE) Then
    NEWAGE.Value = "No DOB Entered"
    End If
    If IsNull(PASS_ALT7) = False Then
    New_ALT_PASS.Value = PASS_ALT7.Value
    Else: IsNull (PASS_ALT7)
    New_ALT_PASS.Value = PASS_ALT6.Value
    End If
    If IsNull(PASS_ALT6) Then
    New_ALT_PASS.Value = PASS_ALT5.Value
    End If
    If IsNull(PASS_ALT5) Then
    New_ALT_PASS.Value = PASS_ALT4.Value
    End If
    If IsNull(PASS_ALT4) Then
    New_ALT_PASS.Value = PASS_ALT3.Value
    End If
    If IsNull(PASS_ALT3) Then
    New_ALT_PASS.Value = PASS_ALT2.Value
    End If
    If IsNull(PASS_ALT2) Then
    New_ALT_PASS.Value = PASS_ALT1.Value
    End If
    If IsNull(PASS_ALT1) Then
    New_ALT_PASS.Value = PASS_ALT.Value
    End If
    If IsNull(PASS_ALT) Then
    New_ALT_PASS.Value = "N/A"
    End If
    currec.MoveNext
    .Update
    Loop
    EndOfRecord:
    currec.Close
    Me.Requery
    End With
    End Sub

  14. #14
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Sorry, Try this:

    Private Sub Command1_Click()
    Dim curdb As Database, currec As DAO.Recordset
    Set curdb = CurrentDb
    Set currec = curdb.OpenRecordset("APFT Rollup")
    With currec
    .Edit
    Do Until currec.EOF
    If IsNull(!Date7) = False Then
    Newpt.Value = !Date7.Value
    Else: IsNull (!Date7)
    !Newpt.Value = !Date6.Value
    End If
    If IsNull(!Date6) Then
    !Newpt.Value = !Date5.Value
    End If
    If IsNull(!Date5) Then
    !Newpt.Value = !Date4.Value
    End If
    If IsNull(!Date4) Then
    !Newpt.Value = !Date3.Value
    End If
    If IsNull(!Date3) Then
    !Newpt.Value = !Date2.Value
    End If
    If IsNull(!Date2) Then
    !Newpt.Value = !Date1.Value
    End If
    If IsNull(!Date1) Then
    !Newpt.Value = !Date.Value
    End If
    If IsNull(!Date) Then
    !Newpt.Value = "No APFT Record"
    End If
    If IsNull(!Score7) = False Then
    NewScore.Value = !Score7.Value
    Else: IsNull (!Score7)
    !NewScore.Value = !Score6.Value
    End If
    If IsNull(!Score6) Then
    !NewScore.Value = !Score5.Value
    End If
    If IsNull(!Score5) Then
    !NewScore.Value = !Score4.Value
    End If
    If IsNull(!Score4) Then
    !NewScore.Value = !Score3.Value
    End If
    If IsNull(!Score3) Then
    !NewScore.Value = !Score2.Value
    End If
    If IsNull(!Score2) Then
    !NewScore.Value = !Score1.Value
    End If
    If IsNull(!Score1) Then
    !NewScore.Value = !Score.Value
    End If
    If IsNull(!Score) Then
    !NewScore.Value = "No Score"
    End If
    If IsNull(!NOTES7) = False Then
    NewNotes.Value = !NOTES7.Value
    Else: IsNull (!NOTES7)
    !NewNotes.Value = !NOTES6.Value
    End If
    If IsNull(!NOTES6) Then
    !NewNotes.Value = !NOTES5.Value
    End If
    If IsNull(!NOTES5) Then
    !NewNotes.Value = !NOTES4.Value
    End If
    If IsNull(!NOTES4) Then
    !NewNotes.Value = !NOTES3.Value
    End If
    If IsNull(!NOTES3) Then
    !NewNotes.Value = !NOTES2.Value
    End If
    If IsNull(!NOTES2) Then
    !NewNotes.Value = !NOTES1.Value
    End If
    If IsNull(!NOTES1) Then
    !NewNotes.Value = !NOTES.Value
    End If
    If IsNull(!NOTES) Then
    !NewNotes.Value = "No Notes"
    End If
    If IsNull(!TYPE7) = False Then
    NewTYPE.Value = !TYPE7.Value
    Else: IsNull (!TYPE7)
    !NewTYPE.Value = !TYPE6.Value
    End If
    If IsNull(!TYPE6) Then
    !NewTYPE.Value = !TYPE5.Value
    End If
    If IsNull(!TYPE5) Then
    !NewTYPE.Value = !TYPE4.Value
    End If
    If IsNull(!TYPE4) Then
    !NewTYPE.Value = !TYPE3.Value
    End If
    If IsNull(!TYPE3) Then
    !NewTYPE.Value = !TYPE2.Value
    End If
    If IsNull(!TYPE2) Then
    !NewTYPE.Value = !TYPE1.Value
    End If
    If IsNull(!TYPE1) Then
    !NewTYPE.Value = !Type.Value
    End If
    If IsNull(!Type) Then
    !NewTYPE.Value = "No Type"
    End If
    If IsNull(!ALT_TIME7) = False Then
    NewALT_TI!Value = !ALT_TIME7.Value
    Else: IsNull (!ALT_TIME7)
    !NewALT_TI!Value = !ALT_TIME6.Value
    End If
    If IsNull(!ALT_TIME6) Then
    !NewALT_TI!Value = !ALT_TIME5.Value
    End If
    If IsNull(!ALT_TIME5) Then
    !NewALT_TI!Value = !ALT_TIME4.Value
    End If
    If IsNull(!ALT_TIME4) Then
    !NewALT_TI!Value = !ALT_TIME3.Value
    End If
    If IsNull(!ALT_TIME3) Then
    !NewALT_TI!Value = !ALT_TIME2.Value
    End If
    If IsNull(!ALT_TIME2) Then
    !NewALT_TI!Value = !ALT_TIME1.Value
    End If
    If IsNull(!ALT_TIME1) Then
    !NewALT_TI!Value = !ALT_TI!Value
    End If
    If IsNull(!ALT_TIME) Then
    !NewALT_TI!Value = "No Score"
    End If
    If IsNull(!RS7) = False Then
    NewRS.Value = !RS7.Value
    Else: IsNull (!RS7)
    !NewRS.Value = !RS6.Value
    End If
    If IsNull(!RS6) Then
    !NewRS.Value = !RS5.Value
    End If
    If IsNull(!RS5) Then
    !NewRS.Value = !RS4.Value
    End If
    If IsNull(!RS4) Then
    !NewRS.Value = !RS3.Value
    End If
    If IsNull(!RS3) Then
    !NewRS.Value = !RS2.Value
    End If
    If IsNull(!RS2) Then
    !NewRS.Value = !RS1.Value
    End If
    If IsNull(!RS1) Then
    !NewRS.Value = !RS.Value
    End If
    If IsNull(!RS) Then
    !NewRS.Value = ""
    End If
    If IsNull(!PU_S7) = False Then
    NewPU_S.Value = !PU_S7.Value
    Else: IsNull (!PU_S7)
    !NewPU_S.Value = !PU_S6.Value
    End If
    If IsNull(!PU_S6) Then
    !NewPU_S.Value = !PU_S5.Value
    End If
    If IsNull(!PU_S5) Then
    !NewPU_S.Value = !PU_S4.Value
    End If
    If IsNull(!PU_S4) Then
    !NewPU_S.Value = !PU_S3.Value
    End If
    If IsNull(!PU_S3) Then
    !NewPU_S.Value = !PU_S2.Value
    End If
    If IsNull(!PU_S2) Then
    !NewPU_S.Value = !PU_S1.Value
    End If
    If IsNull(!PU_S1) Then
    !NewPU_S.Value = !PU_S.Value
    End If
    If IsNull(!PU_S) Then
    !NewPU_S.Value = ""
    End If
    If IsNull(!ALT_EVENT7) = False Then
    NewALT_EVENT.Value = !ALT_EVENT7.Value
    Else: IsNull (!ALT_EVENT7)
    !NewALT_EVENT.Value = !ALT_EVENT6.Value
    End If
    If IsNull(!ALT_EVENT6) Then
    !NewALT_EVENT.Value = !ALT_EVENT5.Value
    End If
    If IsNull(!ALT_EVENT5) Then
    !NewALT_EVENT.Value = !ALT_EVENT4.Value
    End If
    If IsNull(!ALT_EVENT4) Then
    !NewALT_EVENT.Value = !ALT_EVENT3.Value
    End If
    If IsNull(!ALT_EVENT3) Then
    !NewALT_EVENT.Value = !ALT_EVENT2.Value
    End If
    If IsNull(!ALT_EVENT2) Then
    !NewALT_EVENT.Value = !ALT_EVENT1.Value
    End If
    If IsNull(!ALT_EVENT1) Then
    !NewALT_EVENT.Value = !ALT_EVENT.Value
    End If
    If IsNull(!ALT_EVENT) Then
    !NewALT_EVENT.Value = "N/A"
    End If
    If IsNull(!SU_S7) = False Then
    NewSU_S.Value = !SU_S7.Value
    Else: IsNull (!SU_S7)
    !NewSU_S.Value = !SU_S6.Value
    End If
    If IsNull(!SU_S6) Then
    !NewSU_S.Value = !SU_S5.Value
    End If
    If IsNull(!SU_S5) Then
    !NewSU_S.Value = !SU_S4.Value
    End If
    If IsNull(!SU_S4) Then
    !NewSU_S.Value = !SU_S3.Value
    End If
    If IsNull(!SU_S3) Then
    !NewSU_S.Value = !SU_S2.Value
    End If
    If IsNull(!SU_S2) Then
    !NewSU_S.Value = !SU_S1.Value
    End If
    If IsNull(!SU_S1) Then
    !NewSU_S.Value = !SU_S.Value
    End If
    If IsNull(!SU_S) Then
    !NewSU_S.Value = ""
    End If
    If IsNull(!AGE7) = False Then
    NEWAGE.Value = !AGE7.Value
    Else: IsNull (!AGE7)
    !NEWAGE.Value = !AGE6.Value
    End If
    If IsNull(!AGE6) Then
    !NEWAGE.Value = !AGE5.Value
    End If
    If IsNull(!AGE5) Then
    !NEWAGE.Value = !AGE4.Value
    End If
    If IsNull(!AGE4) Then
    !NEWAGE.Value = !AGE3.Value
    End If
    If IsNull(!AGE3) Then
    !NEWAGE.Value = !AGE2.Value
    End If
    If IsNull(!AGE2) Then
    !NEWAGE.Value = !AGE1.Value
    End If
    If IsNull(!AGE1) Then
    !NEWAGE.Value = !AGE.Value
    End If
    If IsNull(!AGE) Then
    !NEWAGE.Value = "No DOB Entered"
    End If
    If IsNull(!PASS_ALT7) = False Then
    New_ALT_PASS.Value = !PASS_ALT7.Value
    Else: IsNull (!PASS_ALT7)
    !New_ALT_PASS.Value = !PASS_ALT6.Value
    End If
    If IsNull(!PASS_ALT6) Then
    !New_ALT_PASS.Value = !PASS_ALT5.Value
    End If
    If IsNull(!PASS_ALT5) Then
    !New_ALT_PASS.Value = !PASS_ALT4.Value
    End If
    If IsNull(!PASS_ALT4) Then
    !New_ALT_PASS.Value = !PASS_ALT3.Value
    End If
    If IsNull(!PASS_ALT3) Then
    !New_ALT_PASS.Value = !PASS_ALT2.Value
    End If
    If IsNull(!PASS_ALT2) Then
    !New_ALT_PASS.Value = !PASS_ALT1.Value
    End If
    If IsNull(!PASS_ALT1) Then
    !New_ALT_PASS.Value = !PASS_ALT.Value
    End If
    If IsNull(!PASS_ALT) Then
    !New_ALT_PASS.Value = "N/A"
    End If
    .Update
    .MoveNext
    Loop
    EndOfRecord:
    End With
    currec.Close
    End Sub
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  15. #15
    dragon_sun252 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    15
    Item not found in this collection, I made sure it is on the page and that it was still in the quary, also this error did not apear with the original. Got to love VBA

    Private Sub Command1_Click()
    Dim curdb As Database, currec As DAO.Recordset
    Set curdb = CurrentDb
    Set currec = curdb.OpenRecordset("APFT Rollup")
    With currec
    .Edit
    Do Until currec.EOF
    If IsNull(!Date7) = False Then
    Newpt.Value = !Date7.Value
    Else: IsNull (!Date7)
    !Newpt.Value = !Date6.Value
    End If
    If IsNull(!Date6) Then
    !Newpt.Value = !Date5.Value
    End If
    If IsNull(!Date5) Then
    !Newpt.Value = !Date4.Value
    End If
    If IsNull(!Date4) Then
    !Newpt.Value = !Date3.Value
    End If
    If IsNull(!Date3) Then
    !Newpt.Value = !Date2.Value
    End If
    If IsNull(!Date2) Then
    !Newpt.Value = !Date1.Value
    End If
    If IsNull(!Date1) Then
    !Newpt.Value = !Date.Value
    End If
    If IsNull(!Date) Then
    !Newpt.Value = "No APFT Record"
    End If
    If IsNull(!Score7) = False Then
    NewScore.Value = !Score7.Value
    Else: IsNull (!Score7)
    !NewScore.Value = !Score6.Value
    End If
    If IsNull(!Score6) Then
    !NewScore.Value = !Score5.Value
    End If
    If IsNull(!Score5) Then
    !NewScore.Value = !Score4.Value
    End If
    If IsNull(!Score4) Then
    !NewScore.Value = !Score3.Value
    End If
    If IsNull(!Score3) Then
    !NewScore.Value = !Score2.Value
    End If
    If IsNull(!Score2) Then
    !NewScore.Value = !Score1.Value
    End If
    If IsNull(!Score1) Then
    !NewScore.Value = !Score.Value
    End If
    If IsNull(!Score) Then
    !NewScore.Value = "No Score"
    End If
    If IsNull(!NOTES7) = False Then
    NewNotes.Value = !NOTES7.Value
    Else: IsNull (!NOTES7)
    !NewNotes.Value = !NOTES6.Value
    End If
    If IsNull(!NOTES6) Then
    !NewNotes.Value = !NOTES5.Value
    End If
    If IsNull(!NOTES5) Then
    !NewNotes.Value = !NOTES4.Value
    End If
    If IsNull(!NOTES4) Then
    !NewNotes.Value = !NOTES3.Value
    End If
    If IsNull(!NOTES3) Then
    !NewNotes.Value = !NOTES2.Value
    End If
    If IsNull(!NOTES2) Then
    !NewNotes.Value = !NOTES1.Value
    End If
    If IsNull(!NOTES1) Then
    !NewNotes.Value = !NOTES.Value
    End If
    If IsNull(!NOTES) Then
    !NewNotes.Value = "No Notes"
    End If
    If IsNull(!TYPE7) = False Then
    NewTYPE.Value = !TYPE7.Value
    Else: IsNull (!TYPE7)
    !NewTYPE.Value = !TYPE6.Value
    End If
    If IsNull(!TYPE6) Then
    !NewTYPE.Value = !TYPE5.Value
    End If
    If IsNull(!TYPE5) Then
    !NewTYPE.Value = !TYPE4.Value
    End If
    If IsNull(!TYPE4) Then
    !NewTYPE.Value = !TYPE3.Value
    End If
    If IsNull(!TYPE3) Then
    !NewTYPE.Value = !TYPE2.Value
    End If
    If IsNull(!TYPE2) Then
    !NewTYPE.Value = !TYPE1.Value
    End If
    If IsNull(!TYPE1) Then
    !NewTYPE.Value = !TYPE.Value
    End If
    If IsNull(!TYPE) Then
    !NewTYPE.Value = "No Type"
    End If
    If IsNull(!ALT_TIME7) = False Then
    NewALT_TIME!Value = !ALT_TIME7.Value
    Else: IsNull (!ALT_TIME7)
    !NewALT_TIME!Value = !ALT_TIME6.Value
    End If
    If IsNull(!ALT_TIME6) Then
    !NewALT_TIME!Value = !ALT_TIME5.Value
    End If
    If IsNull(!ALT_TIME5) Then
    !NewALT_TIME!Value = !ALT_TIME4.Value
    End If
    If IsNull(!ALT_TIME4) Then
    !NewALT_TIME!Value = !ALT_TIME3.Value
    End If
    If IsNull(!ALT_TIME3) Then
    !NewALT_TIME!Value = !ALT_TIME2.Value
    End If
    If IsNull(!ALT_TIME2) Then
    !NewALT_TIME!Value = !ALT_TIME1.Value
    End If
    If IsNull(!ALT_TIME1) Then
    !NewALT_TIME!Value = !ALT_TI!Value
    End If
    If IsNull(!ALT_TIME) Then
    !NewALT_TIME!Value = "No Score"
    End If
    If IsNull(!RS7) = False Then
    NewRS.Value = !RS7.Value
    Else: IsNull (!RS7)
    !NewRS.Value = !RS6.Value
    End If
    If IsNull(!RS6) Then
    !NewRS.Value = !RS5.Value
    End If
    If IsNull(!RS5) Then
    !NewRS.Value = !RS4.Value
    End If
    If IsNull(!RS4) Then
    !NewRS.Value = !RS3.Value
    End If
    If IsNull(!RS3) Then
    !NewRS.Value = !RS2.Value
    End If
    If IsNull(!RS2) Then
    !NewRS.Value = !RS1.Value
    End If
    If IsNull(!RS1) Then
    !NewRS.Value = !RS.Value
    End If
    If IsNull(!RS) Then
    !NewRS.Value = ""
    End If
    If IsNull(!PU_S7) = False Then
    NewPU_S.Value = !PU_S7.Value
    Else: IsNull (!PU_S7)
    !NewPU_S.Value = !PU_S6.Value
    End If
    If IsNull(!PU_S6) Then
    !NewPU_S.Value = !PU_S5.Value
    End If
    If IsNull(!PU_S5) Then
    !NewPU_S.Value = !PU_S4.Value
    End If
    If IsNull(!PU_S4) Then
    !NewPU_S.Value = !PU_S3.Value
    End If
    If IsNull(!PU_S3) Then
    !NewPU_S.Value = !PU_S2.Value
    End If
    If IsNull(!PU_S2) Then
    !NewPU_S.Value = !PU_S1.Value
    End If
    If IsNull(!PU_S1) Then
    !NewPU_S.Value = !PU_S.Value
    End If
    If IsNull(!PU_S) Then
    !NewPU_S.Value = ""
    End If
    If IsNull(!ALT_EVENT7) = False Then
    NewALT_EVENT.Value = !ALT_EVENT7.Value
    Else: IsNull (!ALT_EVENT7)
    !NewALT_EVENT.Value = !ALT_EVENT6.Value
    End If
    If IsNull(!ALT_EVENT6) Then
    !NewALT_EVENT.Value = !ALT_EVENT5.Value
    End If
    If IsNull(!ALT_EVENT5) Then
    !NewALT_EVENT.Value = !ALT_EVENT4.Value
    End If
    If IsNull(!ALT_EVENT4) Then
    !NewALT_EVENT.Value = !ALT_EVENT3.Value
    End If
    If IsNull(!ALT_EVENT3) Then
    !NewALT_EVENT.Value = !ALT_EVENT2.Value
    End If
    If IsNull(!ALT_EVENT2) Then
    !NewALT_EVENT.Value = !ALT_EVENT1.Value
    End If
    If IsNull(!ALT_EVENT1) Then
    !NewALT_EVENT.Value = !ALT_EVENT.Value
    End If
    If IsNull(!ALT_EVENT) Then
    !NewALT_EVENT.Value = "N/A"
    End If
    If IsNull(!SU_S7) = False Then
    NewSU_S.Value = !SU_S7.Value
    Else: IsNull (!SU_S7)
    !NewSU_S.Value = !SU_S6.Value
    End If
    If IsNull(!SU_S6) Then
    !NewSU_S.Value = !SU_S5.Value
    End If
    If IsNull(!SU_S5) Then
    !NewSU_S.Value = !SU_S4.Value
    End If
    If IsNull(!SU_S4) Then
    !NewSU_S.Value = !SU_S3.Value
    End If
    If IsNull(!SU_S3) Then
    !NewSU_S.Value = !SU_S2.Value
    End If
    If IsNull(!SU_S2) Then
    !NewSU_S.Value = !SU_S1.Value
    End If
    If IsNull(!SU_S1) Then
    !NewSU_S.Value = !SU_S.Value
    End If
    If IsNull(!SU_S) Then
    !NewSU_S.Value = ""
    End If
    If IsNull(!AGE7) = False Then
    NEWAGE.Value = !AGE7.Value
    Else: IsNull (!AGE7)
    !NEWAGE.Value = !AGE6.Value
    End If
    If IsNull(!AGE6) Then
    !NEWAGE.Value = !AGE5.Value
    End If
    If IsNull(!AGE5) Then
    !NEWAGE.Value = !AGE4.Value
    End If
    If IsNull(!AGE4) Then
    !NEWAGE.Value = !AGE3.Value
    End If
    If IsNull(!AGE3) Then
    !NEWAGE.Value = !AGE2.Value
    End If
    If IsNull(!AGE2) Then
    !NEWAGE.Value = !AGE1.Value
    End If
    If IsNull(!AGE1) Then
    !NEWAGE.Value = !AGE.Value
    End If
    If IsNull(!AGE) Then
    !NEWAGE.Value = "No DOB Entered"
    End If
    If IsNull(!PASS_ALT7) = False Then
    New_ALT_PASS.Value = !PASS_ALT7.Value
    Else: IsNull (!PASS_ALT7)
    !New_ALT_PASS.Value = !PASS_ALT6.Value
    End If
    If IsNull(!PASS_ALT6) Then
    !New_ALT_PASS.Value = !PASS_ALT5.Value
    End If
    If IsNull(!PASS_ALT5) Then
    !New_ALT_PASS.Value = !PASS_ALT4.Value
    End If
    If IsNull(!PASS_ALT4) Then
    !New_ALT_PASS.Value = !PASS_ALT3.Value
    End If
    If IsNull(!PASS_ALT3) Then
    !New_ALT_PASS.Value = !PASS_ALT2.Value
    End If
    If IsNull(!PASS_ALT2) Then
    !New_ALT_PASS.Value = !PASS_ALT1.Value
    End If
    If IsNull(!PASS_ALT1) Then
    !New_ALT_PASS.Value = !PASS_ALT.Value
    End If
    If IsNull(!PASS_ALT) Then
    !New_ALT_PASS.Value = "N/A"
    End If
    .Update
    .MoveNext
    Loop
    EndOfRecord:
    End With
    currec.Close
    End Sub

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Help with a For Loop in VB
    By JFo in forum Programming
    Replies: 5
    Last Post: 09-29-2011, 02:45 AM
  2. Do While loop
    By jgelpi16 in forum Programming
    Replies: 7
    Last Post: 07-23-2010, 08:21 AM
  3. VBA Loop
    By DreamOn in forum Programming
    Replies: 4
    Last Post: 06-25-2010, 03:35 AM
  4. Issue with while loop and Access 2007 datasheet
    By jermaine123 in forum Programming
    Replies: 2
    Last Post: 01-17-2010, 10:09 AM
  5. For Each LOOP statement
    By zambam737 in forum Programming
    Replies: 3
    Last Post: 10-26-2009, 09:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums