Example Forms ~ Newby Question Access 2000

  • Thread starter Thread starter R Bolling
  • Start date Start date
R

R Bolling

Hello -- Does anyone know where example data entry forms can be
downloaded? There are probably many different ways to handle when a
duplicate entry is entered -- so that it either takes you to the
record or opens up for the new record. I haven't been able to find
any examples of how to do this.

I am trying to put together a data input form using Access 2000, where
if a SSN is already in the database, it takes you to the record, else
it opens up to add a new record. Thanks for any help with this.

Robbie B
 
R Bolling said:
Hello -- Does anyone know where example data entry forms can be
downloaded? There are probably many different ways to handle when a
duplicate entry is entered -- so that it either takes you to the
record or opens up for the new record. I haven't been able to find
any examples of how to do this.

I am trying to put together a data input form using Access 2000, where
if a SSN is already in the database, it takes you to the record, else
it opens up to add a new record. Thanks for any help with this.

Here is my preferred method for doing this.

Initially open the form with zero records returned by using a "always false"
filter...

DoCmd.OpenForm "FormName",,,"1= 0"

Have a TextBox (or ComboBox) in the form header labeled "Go To..." or similar.
In the AfterUpdate event of the control apply a new filter to the form...

Me.Filter = "SSN = '" & Me!GoToControl & "'"
Me.FilterOn = True

This will do exactly as you requested. If the SSN value exists it will be
displayed in the form. If it doesn't then you will be positioned at the
NewRecord position so a new entry can be made. This method has the benefit that
you are never loading more than one record at a time which makes it perform
better.
 
I strongly suggest that you consider NOT storing people's Social Security numbers in an
Access database! This information is just too sensitive. If it gets into the wrong
hands, an identity thief would have a bonanza. Even if you implement Access security, the
database is really not all that secure....all you have done is raised the bar a little
bit.

Tom
_________________________________________


Here is my preferred method for doing this.

Initially open the form with zero records returned by using a "always false"
filter...

DoCmd.OpenForm "FormName",,,"1= 0"

Have a TextBox (or ComboBox) in the form header labeled "Go To..." or similar.
In the AfterUpdate event of the control apply a new filter to the form...

Me.Filter = "SSN = '" & Me!GoToControl & "'"
Me.FilterOn = True

This will do exactly as you requested. If the SSN value exists it will be
displayed in the form. If it doesn't then you will be positioned at the
NewRecord position so a new entry can be made. This method has the benefit that
you are never loading more than one record at a time which makes it perform
better.
_________________________________________


Hello -- Does anyone know where example data entry forms can be
downloaded? There are probably many different ways to handle when a
duplicate entry is entered -- so that it either takes you to the
record or opens up for the new record. I haven't been able to find
any examples of how to do this.

I am trying to put together a data input form using Access 2000, where
if a SSN is already in the database, it takes you to the record, else
it opens up to add a new record. Thanks for any help with this.
 
Tom Wickerath said:
I strongly suggest that you consider NOT storing people's Social Security numbers in an
Access database! This information is just too sensitive. If it gets into the wrong
hands, an identity thief would have a bonanza. Even if you implement Access security, the
database is really not all that secure....all you have done is raised the bar a little
bit.

Well, that warning makes a lot of assumptions. Access is not very secure when
you let people have access to the file. You can certainly secure the file
itself so people cannot access it though.
 
Rick,

I think you are the one who is making the assumptions. After reading your answer, I sent
a private e-mail to Michael Kaplan and asked him to reply on this issue. Shown below is
his answer, along with my question. He gave me his permission to post his answer.

For those who may not know, Michael Kaplan is a former member of the Access Development
team, and has published many articles on Access.

Tom

*********************************************
From: Michael Kaplan
To: Tom Wickerath
Sent: Saturday, December 20, 2003 3:29 PM
Subject: Re: Example Forms ~ Newby Question Access 2000


If they cannot access the file, they cannot open it or link to it in Access.
If they can do one, then they can do the other.

MichKa

*********************************************
From: "Tom Wickerath"
To: Michael Kaplan
Sent: Saturday, December 20, 2003 3:22 PM
Subject: Fw: Example Forms ~ Newby Question Access 2000

Hi Michael,

Can you weigh in on the reply that Rick Brandt just posted on
microsoft.public.access? Maybe I'm wrong, but I always thought that with a
file server based database, you are giving people access to the file.

Tom

______________________________________


I strongly suggest that you consider NOT storing people's Social Security
numbers in an Access database! This information is just too sensitive. If
it gets into the wrong hands, an identity thief would have a bonanza. Even
if you implement Access security, the database is really not all that secure
....all you have done is raised the bar a little bit.

Well, that warning makes a lot of assumptions. Access is not very secure when
you let people have access to the file. You can certainly secure the file
itself so people cannot access it though.
 
But you are making the assumption that the data needs to be protected from the
users. The OP made no claim that this was required. This could be an app in
the HR department of a company with the only people having access to the file
being the people who have authority to see those SSNs. This would be no
different than those same users having access to paper filing cabinets with HR
records in them.

The weakness of Access security is only an issue when you want "levels" of
access. If you want all authorized personnel to have FULL access and
non-authorized personnel to have ZERO access, then there is no problem. You
just use network permissions to make that distinction. You're not suggesting
that there are weaknesses in that are you?


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


Tom Wickerath said:
Rick,

I think you are the one who is making the assumptions. After reading your
answer, I sent> his answer, along with my question. He gave me his permission
to post his answer.
For those who may not know, Michael Kaplan is a former member of the Access Development
team, and has published many articles on Access.

a private e-mail to Michael Kaplan and asked him to reply on this issue.
Shown below is
 
Rick,

You're right--the OP (Original Poster) made no claim of data protection as a requirement.
However, this doesn't mean that it should not be given serious consideration, especially
when social security numbers are involved.
This would be no different than those same users having access to
paper filing cabinets with HR records in them.

I disagree. It is much more likely that if a company has a disgruntled employee in their
HR department, who is looking for ways to retaliate at management, that they will simply
take a copy of the .mdb file in advance of leaving the firm. Unless a paper copy were
compiled that included all SSN's, they'd have to copy by hand or photocopy several
individual records. Not as likely a scenario.

I am not suggesting that there are weaknesses in network permissions. I stick by my
original advice that people consider NOT storing Social Security numbers in an Access
database. If SSN's are really needed, then they should upsize to SQL Server (or Oracle,
etc.) and make sure that the proper security is implemented at that level. Storing SSN's
in an Access database is only asking for trouble. I imagine that a sharp lawyer could win
a big damage award from a company that allowed this practice, if it was later shown that
this became a source of data for a ring of identity thieves.

Tom
_________________________________


But you are making the assumption that the data needs to be protected from the
users. The OP made no claim that this was required. This could be an app in
the HR department of a company with the only people having access to the file
being the people who have authority to see those SSNs. This would be no
different than those same users having access to paper filing cabinets with HR
records in them.

The weakness of Access security is only an issue when you want "levels" of
access. If you want all authorized personnel to have FULL access and
non-authorized personnel to have ZERO access, then there is no problem. You
just use network permissions to make that distinction. You're not suggesting
that there are weaknesses in that are you?


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


Tom Wickerath said:
Rick,

I think you are the one who is making the assumptions. After reading your
answer, I sent> his answer, along with my question. He gave me his permission
to post his answer.
For those who may not know, Michael Kaplan is a former member of the Access Development
team, and has published many articles on Access.

a private e-mail to Michael Kaplan and asked him to reply on this issue.
Shown below is
 
Tom Wickerath said:
Rick,

You're right--the OP (Original Poster) made no claim of data protection as a requirement.
However, this doesn't mean that it should not be given serious consideration, especially
when social security numbers are involved.


I disagree. It is much more likely that if a company has a disgruntled employee in their
HR department, who is looking for ways to retaliate at management, that they will simply
take a copy of the .mdb file in advance of leaving the firm. Unless a paper copy were
compiled that included all SSN's, they'd have to copy by hand or photocopy several
individual records. Not as likely a scenario.

If you shift the argument to what a disgruntled employee might do before leaving
a company than all bets are off for ANY database. It would be just as easy for
said employee to download the SSNs onto a floppy from SQL Server or Oracle or
any other db as it would be to do in Access. Ok, maybe not "just" as easy, but
it would be trivial in any case.

I just don't buy the argument that because Access security sucks (I agree that
it does BTW) that one shouldn't store sensitive data in it. One should not
store sensitive data in an Access file and then rely on Access security to
protect it. I am sure there is sensitive data all over the world that is stored
in plain text files (or Word or Excel FTM). The owners of those files are not
expecting programs like Notepad to provide security. They are simply keeping the
file out of the hands of people they don't want to see it.
 
It would be just as easy for said employee to download the SSNs
onto a floppy from SQL Server or Oracle or any other db as it would
be to do in Access. Ok, maybe not "just" as easy, but it would be
trivial in any case.

You're just plain wrong. I don't agree that it "would be trivial in any case" for a
person to steal sensitive information from a properly secured SQL Server or Oracle
database. For one thing, they would have to do all of their misdeeds on site, instead of
taking a file home on CD or Zip disc, and having all kinds of time to work on it.

You can do what you want in regards to storing sensitive information in Access, Excel or
even a text file.


____________________________________


If you shift the argument to what a disgruntled employee might do before leaving
a company than all bets are off for ANY database. It would be just as easy for
said employee to download the SSNs onto a floppy from SQL Server or Oracle or
any other db as it would be to do in Access. Ok, maybe not "just" as easy, but
it would be trivial in any case.

I just don't buy the argument that because Access security sucks (I agree that
it does BTW) that one shouldn't store sensitive data in it. One should not
store sensitive data in an Access file and then rely on Access security to
protect it. I am sure there is sensitive data all over the world that is stored
in plain text files (or Word or Excel FTM). The owners of those files are not
expecting programs like Notepad to provide security. They are simply keeping the
file out of the hands of people they don't want to see it.
 
Tom Wickerath said:
You're just plain wrong. I don't agree that it "would be trivial in any case" for a
person to steal sensitive information from a properly secured SQL Server or Oracle
database. For one thing, they would have to do all of their misdeeds on site, instead of
taking a file home on CD or Zip disc, and having all kinds of time to work on it.

You can do what you want in regards to storing sensitive information in Access, Excel or
even a text file.

But we're talking about users who have access to the data right? In the case of
an Access MDB they would copy it to a removable disk and put it in their pocket.
In the case of a server db they would import the data into a file on a floppy
using any number of programs capable of connecting to the db. The fact that the
db is "properly secured" is meaningless if the person in question has required
permissions.
 
Geese Rick, give it up! Yes, if the person is the database admin., then of course, it
would be just as easy for them to steal the data. We're not taking about anyone with
those types of privileges.

Getting back to your claim:
It would be just as easy for said employee to download the SSNs
onto a floppy from SQL Server or Oracle or any other db as it would
be to do in Access. Ok, maybe not "just" as easy, but it would be
trivial in any case.

I suppose that might be true for a database that *you* create.


________________________________________


But we're talking about users who have access to the data right? In the case of
an Access MDB they would copy it to a removable disk and put it in their pocket.
In the case of a server db they would import the data into a file on a floppy
using any number of programs capable of connecting to the db. The fact that the
db is "properly secured" is meaningless if the person in question has required
permissions.
 
Tom Wickerath said:
Geese Rick, give it up! Yes, if the person is the database admin., then of course, it
would be just as easy for them to steal the data. We're not taking about anyone with
those types of privileges.

Getting back to your claim:

I suppose that might be true for a database that *you* create.

Clearly you're starting to take this conversation personally or you wouldn't be
resorting to such rhetoric.

If I am a lowly HR clerk whose job it is to enter and edit this data then
clearly I have the ability to print it or copy it to disk and walk out the door
with it. What could possibly stop me? Regardless of any other precautions
taken at some level you have people who DO have access to the data that must be
trusted with it.

You are apparently taking the position that all sensitive data has to be in a
server-based db. Do you believe that in the entirety of the
corporate/government realm that there is no such thing as a sensitive Word
document or Spreadsheet? If not, how do you suppose those files are protected?
The answer is that they are on secure networks or locked up in vaults on
physical media.

A locked leather satchel is not very secure, but if I take that satchel and
place it in a bank vault then it is. My whole point from the beginning of this
thread is that securing data does not have to involve security measures built in
to the file format itself. That is the whole reason we have network security.
 
Rick,

Yes, I am taking it personally, because I have witnessed first-hand how sloppy individuals
can become with sensitive data. The following is a true story that happened about 5 years
ago at The Boeing Company, which is where I work:

Everyone in our building (~270 employees at the time) received an e-mail concerning a
required training course that we needed to take. We were directed to a web site, which
included a link to a .mdb file for scheduling the course. I was quite surprised to notice
that all of a sudden a 6 MB .mdb file was being downloaded to my temporary files folder.
This turned out to be the front-end of a split Access database. It opened up with a gaudy
looking switchboard form that included a textbox where we were suppose to enter our SSN.
Being the curious cat that I am, I was able to close this form and press F11 to display
the database window. I noticed approx. 30 linked tables in this database. One of them
indicated Employees. I opened this table and noticed columns named Org (organization) and
SSN. Within a few minutes, I had over 1800 social security numbers in my possession! I
created a quick query, with a criteria on the Org field, and I had a recordset that
revealed the SSN's of about 70 people in my building, who had apparently already
registered for the training course. Of these 70 people, 10 of the numbers belonged to
first and second level supervisors in my building! I filed a quick complaint with Boeing
Computing Security. They contacted the owner of the database, who then implemented Access
security, which at least made it so that I couldn't directly open the table or create my
own query. At the time, I didn't know that Access security wasn't all that great. I
realize that this was one sloppy-ass example but, yes, to answer your statement, I am
taking it personally!


If I am a lowly HR clerk whose job it is to enter and edit this data then
clearly I have the ability to print it or copy it to disk and walk out the
door with it.

You might have the ability to print one record at a time. It is doubtful that you'd have
the required privileges to create a query that returned all of the names and SSNs in a
recordset. Thus, the opportunity costs would still be fairly high--it could take forever
to print a separate page for each employee in a large Fortune 500 company. It is doubtful
that you could copy it to disk and walk out the door with it.....unless the data was
stored in an Access database. Then the barrier would be significantly lowered for you.


What could possibly stop me?

SQL Server or Oracle security that was properly implemented. With Access, there would be
nothing to stop you. You could take the data home and have all kinds of time to crack any
security in the privacy of your home.


Regardless of any other precautions taken at some level you have people
who DO have access to the data that must be trusted with it.

Of course. I am in full agreement with this statement.


You are apparently taking the position that all sensitive data has to be
in a server-based db.

I'm taking the position that all sensitive data stored by electronic means SHOULD be in a
server-based db. There is a lot of sensitive data that can be stored on paper, and this
should be kept under lock and key.

Do you believe that in the entirety of the corporate/government realm that
there is no such thing as a sensitive Word document or Spreadsheet?

Of course not. At times, I have seen idiot supervisors who sent an Excel print job to a
networked printer with sensitive information, and then they apparently forgot to go pick
it up immediately. There it was, for anyone to see. Just because it happens doesn't mean
that I think it is ok.

If not, how do you suppose those files are protected? The answer is that
they are on secure networks or locked up in vaults on physical media.

That's a big assumption! In the case of the supervisors I have mentioned, they're
probably stored unencrypted on the local hard drive.

A locked leather satchel is not very secure, but if I take that satchel
and place it in a bank vault then it is.

I am in full agreement with this statement.

My whole point from the beginning of this thread is that securing data
does not have to involve security measures built in to the file format itself.
That is the whole reason we have network security.

Yes, but your initial response to my post indicated that you could allow one to access
sensitive data, using an Access database, and rely on network security to protect it.
That's just not true, as Michael Kaplan affirmed in his reply.


Tom
________________________________________


Clearly you're starting to take this conversation personally or you wouldn't be
resorting to such rhetoric.

If I am a lowly HR clerk whose job it is to enter and edit this data then
clearly I have the ability to print it or copy it to disk and walk out the door
with it. What could possibly stop me? Regardless of any other precautions
taken at some level you have people who DO have access to the data that must be
trusted with it.

You are apparently taking the position that all sensitive data has to be in a
server-based db. Do you believe that in the entirety of the
corporate/government realm that there is no such thing as a sensitive Word
document or Spreadsheet? If not, how do you suppose those files are protected?
The answer is that they are on secure networks or locked up in vaults on
physical media.

A locked leather satchel is not very secure, but if I take that satchel and
place it in a bank vault then it is. My whole point from the beginning of this
thread is that securing data does not have to involve security measures built in
to the file format itself. That is the whole reason we have network security.
 
Geeessss -- this thread has really taken a turn! I used SSNs in the
example because it is a unique field and primary key. Instead of a
SSN, let's use a unique Customer number.

I will try the original suggestion, but I was actually looking for
some form examples of entering a unique identifier into a form. If
the number existed, the procedure takes you to the existing record,
else, it opens up a new record on the same form. There are some nice
form examples out there, but I have never seen any examples like this.

Does anyone know where I can download some form examples like this?

Thanks for any tips!

Robbie B.
 
Hi Robbie,

Sometimes threads do that--especially when two strong-willed individuals get involved. In
the end, I think it benefits everyone to see the pros and cons of a particular strategy.
FYI - SSN's are not guaranteed to be unique. The US government has been recycling SSN's
for some time now. Not that this would likely be a problem for you, but the point is that
SSN's are reused when a person expires.

I have an example database that I can send to you, if you'd like, that does what you want.
Send me a private e-mail message, if you are willing to receive a sample database in a
..zip archive.

Tom

_________________________________


Geeessss -- this thread has really taken a turn! I used SSNs in the
example because it is a unique field and primary key. Instead of a
SSN, let's use a unique Customer number.

I will try the original suggestion, but I was actually looking for
some form examples of entering a unique identifier into a form. If
the number existed, the procedure takes you to the existing record,
else, it opens up a new record on the same form. There are some nice
form examples out there, but I have never seen any examples like this.

Does anyone know where I can download some form examples like this?

Thanks for any tips!

Robbie B.
 
Tom Wickerath said:
Rick,

Yes, but your initial response to my post indicated that you could allow one to access
sensitive data, using an Access database, and rely on network security to protect it.
That's just not true, as Michael Kaplan affirmed in his reply.

I did not mean to imply that you could use network security to protect the data
from the person who had authority to use it, but that you could use network
security as an "all or nothing" level of protection. Those with any permissions
might as well have all permissions (per your point), but those with zero
permissions on the folder would be kept out.

My position (stated another way) is that my SSN is just as safe from prying eyes
in a file within a folder that only I have permissions to as it would be in a
SQL Server table. (disregarding network and DB Admins of course).

Granted, I understand that neither of these is absolutely secure, but I can't
see why the security on SQL Server data would be any better than folder
permissions on a properly secured network.
 
Hi Rick,

Now that you are clarifying the "all or nothing" supposition, I think we are in total
agreement!

I'd like to wish you, and everyone else who has taken the time and interest to read this
thread, a very happy holiday season!
Merry Christmas, Happy Hanukkah, Frohliche Weihnachten.........

Tom Wickerath
_________________________________


I did not mean to imply that you could use network security to protect the data
from the person who had authority to use it, but that you could use network
security as an "all or nothing" level of protection. Those with any permissions
might as well have all permissions (per your point), but those with zero
permissions on the folder would be kept out.

My position (stated another way) is that my SSN is just as safe from prying eyes
in a file within a folder that only I have permissions to as it would be in a
SQL Server table. (disregarding network and DB Admins of course).

Granted, I understand that neither of these is absolutely secure, but I can't
see why the security on SQL Server data would be any better than folder
permissions on a properly secured network.
 
I will try the original suggestion, but I was actually looking for
some form examples of entering a unique identifier into a form. If
the number existed, the procedure takes you to the existing record,
else, it opens up a new record on the same form. There are some nice
form examples out there, but I have never seen any examples like this.

It's not that hard to do. Begging the question of SSN's per se, you
could have code like this in the BeforeUpdate event of the textbox in
which the unique ID is entered:

Private Sub txtSSN_BeforeUpdate(Cancel as Integer)
Dim rs As DAO.Recordset
Dim iAns As Integer
Set rs = Me.RecordsetClone
<maybe check first for non-NULL, valid input>
rs.FindFirst "[SSN] = '" & Me!txtSSN & "'" ' assuming Text field
If Not rs.NoMatch Then ' was a record found?
iAns = MsgBox("SSN " & Me!txtSSN & " already exists;" _
& vbCrLf & "Click OK to go to that record, Cancel to start over", _
vbOKCancel)
Cancel = True ' Cancel this add in any case
If iAns = vbOK Then
Me.Bookmark = rs.Bookmark ' open the found record
Else
Me.Undo ' erase the input so far and leave form blank
End If
Else
' New SSN, just let it be added
End If
End Sub
 
Tom Wickerath said:
Geese Rick, give it up! Yes, if the person is the database admin., then of course, it
would be just as easy for them to steal the data. We're not taking about anyone with
those types of privileges.

Getting back to your claim:

I suppose that might be true for a database that *you* create.


________________________________________


But we're talking about users who have access to the data right? In the case of
an Access MDB they would copy it to a removable disk and put it in their pocket.
In the case of a server db they would import the data into a file on a floppy
using any number of programs capable of connecting to the db. The fact that the
db is "properly secured" is meaningless if the person in question has required
permissions.
 
Back
Top