By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,934 Members | 1,476 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,934 IT Pros & Developers. It's quick & easy.

any ideas for boolean yes/no field in table

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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" <ms******@yahoo.ca> wrote in message
news:5a**************************@posting.google.c om...
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

Nov 13 '05 #2

P: n/a
> 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


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
Nov 13 '05 #3

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

"MUHAMAMD SALIM SHAHZAD" <ms******@yahoo.ca> wrote in message
news:5a**************************@posting.google.c om...
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

Nov 13 '05 #4

P: n/a
Thanks a lots sir it works fine with me

so nice of you

regards, your obiedntly

shahzad
Nov 13 '05 #5

P: n/a
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" <ms******@yahoo.ca> schreef in bericht
news:5a**************************@posting.google.c om...
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

Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.