473,509 Members | 2,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Read only records when a form is open!

I am trying to figure out how to lock a record at the point it is
opened in a form. The Access file is going to be stored on a Shared
drive for 3-4 users to access. I need the capability to allow the first
user to enter into the form to allow edit capabilities but if another
user opens the same form they are only allowed to view it and not make
any changes. Any help is appreciated. Thanks in advance!

Jun 23 '06 #1
3 3383
bballpinhead wrote:
I am trying to figure out how to lock a record at the point it is
opened in a form. The Access file is going to be stored on a Shared
drive for 3-4 users to access. I need the capability to allow the first
user to enter into the form to allow edit capabilities but if another
user opens the same form they are only allowed to view it and not make
any changes. Any help is appreciated. Thanks in advance!


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You could use the form's AllowEdits property and the OnCurrent event and
the form's NewRecord property.

Private Sub Form_Current()

If Me.NewRecord Then
Me.AllowEdits = True
Else
Me.AllowEdits = False
End If

End Sub

The only fault w/ this is when the first user enters the data and saves
it, but then realizes he entered something incorrectly & tries to go
back to correct it, he will not be able to correct it 'cuz AllowEdits
will then be set to False. You'll need some sort of override
capability, or a form that only the Administrator can open that will
allow the record to be changed.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRJw32YechKqOuFEgEQIbhACeOcyhE61UnmeI0hjMXKPoyk CvZQwAoKWl
43vQlGS5CCn1ZA71rLUqZlKg
=75IC
-----END PGP SIGNATURE-----
Jun 23 '06 #2
This won't work in my case. Any other suggestions?

Jun 23 '06 #3
In comp.databases.ms-access bballpinhead wrote:
I am trying to figure out how to lock a record at the point it is
opened in a form. The Access file is going to be stored on a Shared
drive for 3-4 users to access. I need the capability to allow the
first user to enter into the form to allow edit capabilities but if
another user opens the same form they are only allowed to view it and
not make any changes. Any help is appreciated. Thanks in advance!


You could store the user's login ID in the table, and only allow edits
if the stored ID matches the current user's ID.


--
--
Bernard Peek
ba*@shrdlu.com
Jun 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
4062
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
6
2496
by: Robin S. | last post by:
**Eric and Salad - thank you both for the polite kick in the butt. I hope I've done a better job of explaining myself below. I am trying to produce a form to add products to a table (new...
13
3440
by: Jan | last post by:
Hi I have a database that I use to keep track of the sales promotions that we send to companies. I normally send a mailing based on a subset of the companies in the database (found using the...
1
3616
by: Ardith via AccessMonster.com | last post by:
Hi, I am running Access 2000. I have an application with a web-based front end which accesses an Access back end using ASP (not .Net). It is being used by two groups of people - identical...
9
4787
by: Sandy | last post by:
Hi all, I have a form to list records (frmListIssue) which I call from different other forms. My wish is to display a message when the form is called and empty; no records to display. I want to...
5
7518
by: JenHu | last post by:
Hi experts, I wrote a function which retrieves a file in the folder, the file path is : Dim sr As New StreamReader(strFilepath & ReturnFileName) What if I have more than 1 file_name in...
2
8154
by: Robert | last post by:
I am trying to give the user dynamic search capabilities to select almost any record in the database from criteria they select. Everything seems to work except when I open the display form to...
10
2507
by: 60325 | last post by:
This is the page where I collect the data in drop-down boxes with values of 1-10 and send it to a submitted page to do calculations. Example: Employee1 TeamScore(1-10) Employee2 ...
4
2920
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...
2
1402
by: BASSPU03 | last post by:
I have a main form with two subforms whose underlying tables are related through one-to-many relationships. The forms function as follows: frmFiscalYear > frmBulkObligations > sfrmProjects I...
0
7135
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
7342
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
7410
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7505
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
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
440
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.