Current user on a continuous form

W

worksfire1

I have a function that determines the current network login ID for a user. I
have placed a piece of code in my "Save All & Close" button on a continuous
form where if the Create User text box is empty, place the current user login
and current date/time in respective text boxes . (The users like to know
when they are closing a form that it saves.)

The only problem with that is it only does this on the current record on the
continuous form where the user's cursor is located at when they "Save All &
Close". What can I do to make the code place the current user and date on
all records on the continous form that have a null Create user text box?
instead of just on the record they are on.

Private Sub cmdSaveAllRecordsAndClose_Click()
If IsNull(Me.txtCreateUser) Then
Me.txtCreateUser = ap_GetUserName()
Me.txtCreateDate = Now()
Else
End If
DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "frmMissingChargesinCP"
End If
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