Hi, I'm using an unbound textbox(txtPhone1) to show data(Phone1) on my main form. I populated txtPhone1 using this
Me.cboLastName_SI is a combo box that is based on a query that I use to fill all the data on my main form. My main form doesn't have any bound controls. I was hoping to be able to edit the phone number textbox(txtPhone1) using this
But I can't seem to pickup the oldvalue. I tried this in a couple of different events. Do I need to set a global variable to pick up the txtPhone1 value before an event occurs or is there a better way to set this up?
Thanks Jim
Code:
Me.txtPhone1_SI = Me.cboLastname_SI.Column(4).
Code:
Dim ioldvalue As Variant
Dim inewvalue As Variant
ioldvalue = Me![cboPhone1].OldValue
inewvalue = Me![cboPhone1].Value
If inewvalue <> ioldvalue Then
CurrentDb.Execute "UPDATE tblEmployee SET [Phone1]=inewvalue"
End If
But I can't seem to pickup the oldvalue. I tried this in a couple of different events. Do I need to set a global variable to pick up the txtPhone1 value before an event occurs or is there a better way to set this up?
Thanks Jim