PLEASE HELP !! User Names picking up problem in a query

  • Thread starter Thread starter Audrey
  • Start date Start date
A

Audrey

Hi Guys

My problem is like this.
I have a database which will pick up the user name from
the user login names from the network and passes that on
to a seperate Form called frmLogin and to the textbox
whichhas the name txtLoginName. There is no problem here
and this works fine.

Now I have setup a qery which will filter to view current
user's records for Divisional Managers from another form
(frmtblAPT).
In the query design I have set as
WHERE (((frmtblAPT.[DivisionalManager])=[Forms]![frmLogin]!
[LoginName]));

I end up with a msg box asking for Enter Parameter value
[Forms]![frmLogin]![LoginName]

What could be the Problem. Please Help.
Our network usernames are set up as Audrey.Tovi
Could the periods between the names be problem?? if so how
to rectify this.
Thanks in advance
 
Is that login form open? If the form is not open, Access can't pull data
from it. Why not just call the network userid in your query? Why put it in
a form?

How do you 'get the network id'? I have a public function that gets it ans
assigns it to fOSUserNAme(). To filter my records in a query, I'd just add
the field from the table where the creator's userid is stored and then in
the criteria I'd put...

= fOSUserName()

Hope that helps,

Rick B
 
Back
Top