hello all , can you help please ?
i have a form called "sheet1" and a subform called "subform",
the form has a text box called "stat" and the subform has a text box called "status",
i have a record set to change all status values to "expired" on a set condition,
Private Sub Form_Current()
With Me.RecordsetClone
If Not (.BOF And .EOF) Then
.MoveFirst
End If
Do Until .EOF
If (![twelve month update] <= Date) And (!status & "") <> "Expired" Then
.Edit
!status = "Expired"
.Update
End If
.MoveNext
Loop
End With
End Sub
what i am trying to achieve is when i open the subform and it goes through the record set that if all the "status" values are "expired" then the "stat" text box on "sheet1" will change to "expired",
can you help please
i have a form called "sheet1" and a subform called "subform",
the form has a text box called "stat" and the subform has a text box called "status",
i have a record set to change all status values to "expired" on a set condition,
Private Sub Form_Current()
With Me.RecordsetClone
If Not (.BOF And .EOF) Then
.MoveFirst
End If
Do Until .EOF
If (![twelve month update] <= Date) And (!status & "") <> "Expired" Then
.Edit
!status = "Expired"
.Update
End If
.MoveNext
Loop
End With
End Sub
what i am trying to achieve is when i open the subform and it goes through the record set that if all the "status" values are "expired" then the "stat" text box on "sheet1" will change to "expired",
can you help please