J
Joan
Hi,
On an AfterUpdate event for a control on a form I have code that sets
another control on the form to the value that was just updated. The problem
is, that if the user mistakenly enters data in the wrong record's control
with the AfterUpdate event and then upon realizing their mistake tries to
backspace the data out or delete it, then the other control that is affected
by the AfterUpdate event still shows the value originally entered. How can
I get this other control([ReturnedStore]) to also be blank or empty? Below
is my code.
Joan
Private Sub Store_AfterUpdate()
Dim db As Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("EnterStoresQuery", dbOpenDynaset)
If Forms!SalesScreen!Returned = "Y" And Not
IsNull(Forms!SalesScreen![Store]) Then
Forms!SalesScreen!ReturnedStore = Forms!SalesScreen!Store
Forms!SalesScreen!ReturnedSalePrice = Forms!SalesScreen!SalesPrice
End If
rs.Close
db.Close
End Sub
On an AfterUpdate event for a control on a form I have code that sets
another control on the form to the value that was just updated. The problem
is, that if the user mistakenly enters data in the wrong record's control
with the AfterUpdate event and then upon realizing their mistake tries to
backspace the data out or delete it, then the other control that is affected
by the AfterUpdate event still shows the value originally entered. How can
I get this other control([ReturnedStore]) to also be blank or empty? Below
is my code.
Joan
Private Sub Store_AfterUpdate()
Dim db As Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("EnterStoresQuery", dbOpenDynaset)
If Forms!SalesScreen!Returned = "Y" And Not
IsNull(Forms!SalesScreen![Store]) Then
Forms!SalesScreen!ReturnedStore = Forms!SalesScreen!Store
Forms!SalesScreen!ReturnedSalePrice = Forms!SalesScreen!SalesPrice
End If
rs.Close
db.Close
End Sub