C
cmiller
Again, please forgive me for being uneducated in ACCESS; I have attempted
what I believe you instructed 3 times starting with a fresh copy of my
current database and failed all three attempts. Maybe I am missing
something.
I have one table,TblMainData, with all the data.
I have another table, TblUserName, with all the usernames with their display
names.
I have one query, QrySelMainData, pulling data from TblMainData. I added
the field named: "Expr1: [ChangedBy]" and in the criteria of this field
entered: "[Forms]![FrmMyMenu]![HiddenName]"
I have a switchboard form that has one command button to open the data entry
form. In this form I have created a Label named "HiddenName". This field is
set to "Visible: No" and in the Open Event I have:
Me.HiddenName = Nz(DLookup("DisplayName","TblUserName","UserName =" &
Environ("UserName")),"ERROR")
If Me.HiddenName = "ERROR" Then MsgBox "UserName not found."
End If
I also have the form, FrmMainData, pulling fields from QrySelMainData. In
the BeforeUpdate event, I have:
Me.ChangedBy = Environ("UserName")
OKAY. That is me. Could someone please tell me what I have done wrong? To
add insult, I am being told by gurus who know ACCESS that this is a simple
task, but they don't have time for me.
what I believe you instructed 3 times starting with a fresh copy of my
current database and failed all three attempts. Maybe I am missing
something.
I have one table,TblMainData, with all the data.
I have another table, TblUserName, with all the usernames with their display
names.
I have one query, QrySelMainData, pulling data from TblMainData. I added
the field named: "Expr1: [ChangedBy]" and in the criteria of this field
entered: "[Forms]![FrmMyMenu]![HiddenName]"
I have a switchboard form that has one command button to open the data entry
form. In this form I have created a Label named "HiddenName". This field is
set to "Visible: No" and in the Open Event I have:
Me.HiddenName = Nz(DLookup("DisplayName","TblUserName","UserName =" &
Environ("UserName")),"ERROR")
If Me.HiddenName = "ERROR" Then MsgBox "UserName not found."
End If
I also have the form, FrmMainData, pulling fields from QrySelMainData. In
the BeforeUpdate event, I have:
Me.ChangedBy = Environ("UserName")
OKAY. That is me. Could someone please tell me what I have done wrong? To
add insult, I am being told by gurus who know ACCESS that this is a simple
task, but they don't have time for me.