Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 13th, 2005, 12:59 AM
MUHAMAMD SALIM SHAHZAD
Guest
 
Posts: n/a
Default any ideas for boolean yes/no field in table

dear respected Gurus,

Sir, I created one table(say tblA has UserID/password) to verify, then
i Have another table(say TableB UserID/Allow(Yes/No), tableA has
1-many relations with tableB

now after succesfully login in the system, I want to check the user is
allowed to login/allow to open particular form or not? so on allow
field i put the yes/no for various users...

i try also dcount/dlookup, but could not success

any ideas what codes should i try or any hints can help me and
appreciate to learn as novice in access

regards yours student

shahzad
  #2  
Old November 13th, 2005, 12:59 AM
Larry Linson
Guest
 
Posts: n/a
Default Re: any ideas for boolean yes/no field in table

I can tell you that no "homegrown" security scheme is likely to provide much
protection. Access has its own security features, and even those can be
hacked, but not nearly so easily as tables within the database itself.

Because I know that self-implemented security is not a productive use of
time, I have spent little time on the matter since the early 1990's when a
client insisted on "security lite" even after being advised that it was
useless even against relative novices who wanted access. That one was too
complex to explain in a newsgroup post, even if I remembered all the
details.

As you didn't describe the details of what you did, it will be difficult for
anyone to offer useful suggestions to improve it.

My suggestion is to download the security FAQ from the Microsoft site and
study it carefully, several times, before deciding whether to use it or not.
It is NON-trivial. Then again, so would be a scheme you implemented
yourself, and yours would ineffective, or less effective, just by nature of
where/how you have to keep the data,

Larry Linson
Microsoft Access MVP


"MUHAMAMD SALIM SHAHZAD" <msssd786@yahoo.ca> wrote in message
news:5a7850d5.0406200421.2da4090a@posting.google.c om...[color=blue]
> dear respected Gurus,
>
> Sir, I created one table(say tblA has UserID/password) to verify, then
> i Have another table(say TableB UserID/Allow(Yes/No), tableA has
> 1-many relations with tableB
>
> now after succesfully login in the system, I want to check the user is
> allowed to login/allow to open particular form or not? so on allow
> field i put the yes/no for various users...
>
> i try also dcount/dlookup, but could not success
>
> any ideas what codes should i try or any hints can help me and
> appreciate to learn as novice in access
>
> regards yours student
>
> shahzad[/color]


  #3  
Old November 13th, 2005, 01:00 AM
Pieter Linden
Guest
 
Posts: n/a
Default Re: any ideas for boolean yes/no field in table

> Sir, I created one table(say tblA has UserID/password) to verify, then[color=blue]
> i Have another table(say TableB UserID/Allow(Yes/No), tableA has
> 1-many relations with tableB
>
> now after succesfully login in the system, I want to check the user is
> allowed to login/allow to open particular form or not? so on allow
> field i put the yes/no for various users...
>
> i try also dcount/dlookup, but could not success
>
> any ideas what codes should i try or any hints can help me and
> appreciate to learn as novice in access
>
> regards yours student
>
> shahzad[/color]

Option Compare Database
Option Explicit

Private Sub Command2_Click()
If UserAllowed(Me.txtUsername) Then
DoCmd.OpenForm "Form1"
Else
MsgBox Me.txtUsername & " not allowed to open Form1"
End If
End Sub

Private Function UserAllowed(ByVal strUsername As String) As Boolean
Dim strSQL As String
Dim rs As DAO.Recordset

strSQL = "SELECT tblAllowOpen.AllowOpen FROM tblAllowOpen WHERE
tblAllowOpen.UserName ='" & Me.txtUsername & "';"
Set rs = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)

UserAllowed = rs.Fields("AllowOpen")
rs.Close
Set rs = Nothing
End Function
  #4  
Old November 13th, 2005, 01:00 AM
Alan Webb
Guest
 
Posts: n/a
Default Re: any ideas for boolean yes/no field in table

Muhamamd,
Dude, tie it to a client-server db engine like SQL Server or MSDE and rely
on the security there.

"MUHAMAMD SALIM SHAHZAD" <msssd786@yahoo.ca> wrote in message
news:5a7850d5.0406200421.2da4090a@posting.google.c om...[color=blue]
> dear respected Gurus,
>
> Sir, I created one table(say tblA has UserID/password) to verify, then
> i Have another table(say TableB UserID/Allow(Yes/No), tableA has
> 1-many relations with tableB
>
> now after succesfully login in the system, I want to check the user is
> allowed to login/allow to open particular form or not? so on allow
> field i put the yes/no for various users...
>
> i try also dcount/dlookup, but could not success
>
> any ideas what codes should i try or any hints can help me and
> appreciate to learn as novice in access
>
> regards yours student
>
> shahzad[/color]


  #5  
Old November 13th, 2005, 01:00 AM
MUHAMAMD SALIM SHAHZAD
Guest
 
Posts: n/a
Default Re: any ideas for boolean yes/no field in table

Thanks a lots sir it works fine with me

so nice of you

regards, your obiedntly

shahzad
  #6  
Old November 13th, 2005, 01:19 AM
Genius Maximus
Guest
 
Posts: n/a
Default Re: any ideas for boolean yes/no field in table

You should make accounts and permissions per account through the safety menu
of Access.
The helpfile can get you on the way.
Success


"MUHAMAMD SALIM SHAHZAD" <msssd786@yahoo.ca> schreef in bericht
news:5a7850d5.0406200421.2da4090a@posting.google.c om...[color=blue]
> dear respected Gurus,
>
> Sir, I created one table(say tblA has UserID/password) to verify, then
> i Have another table(say TableB UserID/Allow(Yes/No), tableA has
> 1-many relations with tableB
>
> now after succesfully login in the system, I want to check the user is
> allowed to login/allow to open particular form or not? so on allow
> field i put the yes/no for various users...
>
> i try also dcount/dlookup, but could not success
>
> any ideas what codes should i try or any hints can help me and
> appreciate to learn as novice in access
>
> regards yours student
>
> shahzad[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles