record still not updated until close the form or run report

S

Song Su

I have a cmdStart button in frmWorkshop. When click, it opens another form
frmSignIn
On load event of frmSignIn, I make frmWorkshop visible = false
Below is cmdSignIn on form frmSignIn. It seems the line
Forms!frmWorkshop.[WS]=1 always in the memory instead of update the record.
Me.Dirty=False does not help. I have to either close frmWorkshop, or run
other report be fore the update to show up. Where did I do wrong?

Private Sub cmdSignIn_Click()

Dim rst As DAO.Recordset

Set rst = Forms!frmWorkshop.RecordsetClone
If Me.intEN <> "" Then
rst.FindFirst "EN = " & Me.intEN
If rst.NoMatch Then
txtMsg = "Employee number not found!"
Else
Forms!frmWorkshop.Bookmark = rst.Bookmark
If Forms!frmWorkshop.[WS] = 1 Then
txtMsg = "You have already signed in " &
Forms!frmWorkshop.[Full_Name] & "!"
Else
Forms!frmWorkshop.[WS] = 1
Me.Dirty = False
txtMsg = "Welcome! " & Forms!frmWorkshop.[Full_Name] & "."
End If
Me.intEN = ""
cboLookUp = ""
End If
End If
intEN.SetFocus
rst.Close
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top