Prompt before login

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my database I have 3 login accounts, I need a prompt to show users which
category they fall into prior to their logging in, can this be done with
simple VB code?
 
Not sure what you mean. What is a "category"? How would Access know? If
John logs in every day, why would you want to remind him of his "category"
each time he logged in?

In any case, it can't be done BEFORE they log in, since no code executes
until after the login.
 
After the user login, when you check if the user exist then you can add the
following VBA

dim MyDB as databse
dim MyRec as recordset, CatStr as string
set MyDB=codedb()
set myrec=mydb.openrecordset("Select * from categoryTable Where user_id = "
& me.userid)
if not myrec.eof then
while not myrec.eof
CatStr = CatStr & "," & myrec!categoryField
myrec.movenext
wend
end if
if not isnull(CatStr ) and CatStr <>"" then
msgbox "the categories you have are: " & mid(CatStr ,2)
endif
 
Sean said:
In my database I have 3 login accounts, I need a prompt to show
users which category they fall into prior to their logging in, can
this be done with simple VB code?

To get there before log on, I would think you would need an independent
utility to display the message and then start Access.

If you were using user level security, Access would know what group the
user was in from their individual log on.
 

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

Back
Top