G
Gator
How do I open a Form with only the user's information displayed based on a
username
username
Douglas J. Steele said:What do you mean by username: their Windows Network ID, or have you applied
User Level Security (ULS) and you mean their Access user name?
For Windows Network ID, the function in
http://www.mvps.org/access/api/api0008.htm at "The Access Web" will return
their id. You can then use something like:
DoCmd.OpenForm "NameOfForm", acNormal, , "[UserId] = '" & fOSUserName() &
"'"
For ULS, the CurrentUser function returns their user name, so you'd use
DoCmd.OpenForm "NameOfForm", acNormal, , "[UserId] = '" & CurrentUser() &
"'"
(both solutions assume, of course, that you've stored a UserId on each
record so that you know to whom each record applies)
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
Gator said:How do I open a Form with only the user's information displayed based on a
username
Douglas J. Steele said:What do you mean by username: their Windows Network ID, or have you applied
User Level Security (ULS) and you mean their Access user name?
For Windows Network ID, the function in
http://www.mvps.org/access/api/api0008.htm at "The Access Web" will return
their id. You can then use something like:
DoCmd.OpenForm "NameOfForm", acNormal, , "[UserId] = '" & fOSUserName() &
"'"
For ULS, the CurrentUser function returns their user name, so you'd use
DoCmd.OpenForm "NameOfForm", acNormal, , "[UserId] = '" & CurrentUser() &
"'"
(both solutions assume, of course, that you've stored a UserId on each
record so that you know to whom each record applies)
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
Gator said:How do I open a Form with only the user's information displayed based on a
username
Tom Ventouris said:I am looking for something similar:
Some way to get the machine name and then run code using select case.
Different code from different machines.
I plan to place an unbound text box on the hidden form which maintains the
link between the FE and BE. What I need is some way to get the machine name
in the unbound box and use this in the code.
Any help on this one?
Douglas J. Steele said:What do you mean by username: their Windows Network ID, or have you applied
User Level Security (ULS) and you mean their Access user name?
For Windows Network ID, the function in
http://www.mvps.org/access/api/api0008.htm at "The Access Web" will return
their id. You can then use something like:
DoCmd.OpenForm "NameOfForm", acNormal, , "[UserId] = '" & fOSUserName() &
"'"
For ULS, the CurrentUser function returns their user name, so you'd use
DoCmd.OpenForm "NameOfForm", acNormal, , "[UserId] = '" & CurrentUser() &
"'"
(both solutions assume, of course, that you've stored a UserId on each
record so that you know to whom each record applies)
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
Gator said:How do I open a Form with only the user's information displayed based on a
username
Gator said:Username that a Client would establish via their account information in DB
--
Gator
Douglas J. Steele said:What do you mean by username: their Windows Network ID, or have you
applied
User Level Security (ULS) and you mean their Access user name?
For Windows Network ID, the function in
http://www.mvps.org/access/api/api0008.htm at "The Access Web" will
return
their id. You can then use something like:
DoCmd.OpenForm "NameOfForm", acNormal, , "[UserId] = '" & fOSUserName() &
"'"
For ULS, the CurrentUser function returns their user name, so you'd use
DoCmd.OpenForm "NameOfForm", acNormal, , "[UserId] = '" & CurrentUser() &
"'"
(both solutions assume, of course, that you've stored a UserId on each
record so that you know to whom each record applies)
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
Gator said:How do I open a Form with only the user's information displayed based
on a
username