J
JoMcGuire
this program is tracking documents, in this case scanned "books"
(scentist notes)
In a single row on the form there is:
Check box Scanned Date Scanned by
Name chkScanned txtScannedDate cmbScannedBy
ctrl BookScanned BookScannedDate BookScannedBy
1)cmbScannedBy is a cmb box populated by a qry pulling active staff
members: SELECT [qryStaff_Active].[FullName], [qryStaff_Active].[Login]
FROM qryStaff_Active;
2)cmbScannedBy is also auto-populated with current user's name when
check box is checked.. cleared when check box is unchecked.. here's
that vb code
If Me.chkScanned.Value Then
Me.cmbScannedBy = CurrentUser()
'Me.BookScannedBy = cmbScannedBy.Column(1)
Me.txtScannedDate.Value = Now()
Else
Me.cmbScannedBy.Value = Null
Me.txtScannedDate = Null
End If
3) the cmb box must still be 'editable' after it is auto populated, as
in.. If I'm the user, it autopopulates my name, but then I need the
option to drop down and select someone else. I'm not sure of the
practical application of this feature, but it is the user's request...
thus..both 1) & 2)
The user wants to see the user name, not the login captured with
CurrentUser() on the screen and have the user name recorded in the
database. The properties of the cmbScannedby combo box have been set
to pull the correct colum of the query that puts the username in the
form, infact, from the screen view this is working perfectly.
I can't seem to get the user's name recording in the database, no
matter what I do..it still records the user ID. You can see that I
commented out one attempt that didn't work. I also tried that same
line Me.BookScannedBy=cmbScannedBy.column(1) in event properties,
afterupdate, beforeupdate..etc.
Any advice ?
(scentist notes)
In a single row on the form there is:
Check box Scanned Date Scanned by
Name chkScanned txtScannedDate cmbScannedBy
ctrl BookScanned BookScannedDate BookScannedBy
1)cmbScannedBy is a cmb box populated by a qry pulling active staff
members: SELECT [qryStaff_Active].[FullName], [qryStaff_Active].[Login]
FROM qryStaff_Active;
2)cmbScannedBy is also auto-populated with current user's name when
check box is checked.. cleared when check box is unchecked.. here's
that vb code
If Me.chkScanned.Value Then
Me.cmbScannedBy = CurrentUser()
'Me.BookScannedBy = cmbScannedBy.Column(1)
Me.txtScannedDate.Value = Now()
Else
Me.cmbScannedBy.Value = Null
Me.txtScannedDate = Null
End If
3) the cmb box must still be 'editable' after it is auto populated, as
in.. If I'm the user, it autopopulates my name, but then I need the
option to drop down and select someone else. I'm not sure of the
practical application of this feature, but it is the user's request...
thus..both 1) & 2)
The user wants to see the user name, not the login captured with
CurrentUser() on the screen and have the user name recorded in the
database. The properties of the cmbScannedby combo box have been set
to pull the correct colum of the query that puts the username in the
form, infact, from the screen view this is working perfectly.
I can't seem to get the user's name recording in the database, no
matter what I do..it still records the user ID. You can see that I
commented out one attempt that didn't work. I also tried that same
line Me.BookScannedBy=cmbScannedBy.column(1) in event properties,
afterupdate, beforeupdate..etc.
Any advice ?