H
Harry F.
OK,
Here's the story. I have a form used to assign work. On it, I pull the
user's Windows login, and use that to generate their name. These values are
stored in unbound text boxes atop the form. The form itself is bound to a
table that stores the work assigned. I need to populate a field in this
table with the user's name who assigned the work. I had used the code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim D As DAO.Database, R As DAO.Recordset
Set D = CurrentDb()
Set R = D.OpenRecordset("tblAllRequests", dbOpenDynaset)
If IsNull(R![FunnelManagerID]) Then
R.Edit
R![FunnelManagerID] = Me!txtUserID
R.Update
End If
If IsNull(R![FunnelManagerName]) Then
R.Edit
R![FunnelManagerName] = Me!txtUserName
R.Update
End If
End Sub
It worked before I split the database. (I think).
Now it no longer works. What can I do to have the unbound textbox populate
the field for every record? Can I? Please help!
Here's the story. I have a form used to assign work. On it, I pull the
user's Windows login, and use that to generate their name. These values are
stored in unbound text boxes atop the form. The form itself is bound to a
table that stores the work assigned. I need to populate a field in this
table with the user's name who assigned the work. I had used the code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim D As DAO.Database, R As DAO.Recordset
Set D = CurrentDb()
Set R = D.OpenRecordset("tblAllRequests", dbOpenDynaset)
If IsNull(R![FunnelManagerID]) Then
R.Edit
R![FunnelManagerID] = Me!txtUserID
R.Update
End If
If IsNull(R![FunnelManagerName]) Then
R.Edit
R![FunnelManagerName] = Me!txtUserName
R.Update
End If
End Sub
It worked before I split the database. (I think).
Now it no longer works. What can I do to have the unbound textbox populate
the field for every record? Can I? Please help!