473,395 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
Nov 13 '05 #1
5 1505
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
> 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
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
Thanks a lots sir it works fine with me

so nice of you

regards, your obiedntly

shahzad
Nov 13 '05 #5
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Salad | last post by:
I have a strange one that's making me scratch my head. The app is written in AccessXP. The table is a FoxPro 2.6 table. I link to it via ODBC. There is a field called Active, type Logical...
1
by: Andrew Smith via AccessMonster.com | last post by:
Okay here is my problem. I have a table that is imported by the user and then I need to add a boolean field to the table with Format Yes/No and the Display Control as Check box. Here is what I...
10
by: Tom | last post by:
I am looking for some ideas for how to design the layout of the form for data entry and to display the data for the following situation: There are many sales associates. A sales associate can work...
10
by: dba123 | last post by:
Why am I getting this error for Budget? Error: An exception of type 'System.FormatException' occurred in mscorlib.dll but was not handled in user code Additional information: String was not...
3
by: reidarT | last post by:
I have an sql db with one field set as bit . I have a window form with a datagrid. The field is shown as a checkbox. My problem is that the value doesn't show in the field They are all blank even...
4
by: Ironr4ge | last post by:
Hi everyone, I am trying to open the form "Languages" with a diffrent record source to the "Contacts" form where I conducted the search or filter... . I was wondering whether there was a vba...
11
by: JeffP | last post by:
Just have a small problem with boolean fields in a list box showing as 0 and -1, not Yes/No or True/False. Is there any fix to this? -- Jeff "More Access Stuff." http://www.asken.com.au
4
by: Yitzak | last post by:
Have a query that is arregated into crosstab query, it is working correctly. select Yes as selected from tblname or select true as selected from tblname Produces -1 ( vba value of True) in...
19
by: tshad | last post by:
I have a value in my sql table set to tinyint (can't set to bit). I am trying to move it into a boolean field in my program and have tried: isTrue = (int)dbReader and isTrue =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.