Theguyinthehat
Registered User.
- Local time
- Today, 09:09
- Joined
- Aug 17, 2009
- Messages
- 46
I really don't get why it can't find the record. I've checked spellings and everything. LotNumber is a text-formatted field, so that's right. Can anyone spot the problem? In the past I've used invisible text boxes to host the time, and I could do it again, but I'm sick of skirting bugs I don't understand... Here's the code.
Private Sub cmdSave_Click()
Dim db As Object
Dim time As Object
Set db = CurrentDb
Set time = db.OpenRecordset("SELECT [Time JobEntry] FROM dptdata WHERE [LotNumber] = '" & Me.txtLotNumber & "'")
time.Edit
time("Time JobEntry") = Now()
time.Update
...
End sub
Private Sub cmdSave_Click()
Dim db As Object
Dim time As Object
Set db = CurrentDb
Set time = db.OpenRecordset("SELECT [Time JobEntry] FROM dptdata WHERE [LotNumber] = '" & Me.txtLotNumber & "'")
time.Edit
time("Time JobEntry") = Now()
time.Update
...
End sub