473,387 Members | 3,781 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,387 software developers and data experts.

Allowing edits on only uncomplete records

Hi

I was wandering if some one could help.

I have developed a database in MS Access that records testing information. The problem I have come across is that some staff are overwritting previous test information instead of adding a new record (no matter how many times it is explained to them they are still doing it.)

I want them to be able to still view all the tests sat but only edit those records that the results are still pending (so they can be updated when the results are received). Is there an easy way of doind this?

My VBA skills are practically non existant so have not found an easy way to do this, although I can edit some parametres in code to suit my setup.

The OS used is Windows XP and Access versions accessing the database range from xp, 2003 and 2007 (it was developed in 2007 if this helps)

Any help would be greatly appreciated

Thanks
Jul 24 '07 #1
4 1273
Lysander
344 Expert 100+
Hi

I was wandering if some one could help.

I have developed a database in MS Access that records testing information. The problem I have come across is that some staff are overwritting previous test information instead of adding a new record (no matter how many times it is explained to them they are still doing it.)

I want them to be able to still view all the tests sat but only edit those records that the results are still pending (so they can be updated when the results are received). Is there an easy way of doind this?

My VBA skills are practically non existant so have not found an easy way to do this, although I can edit some parametres in code to suit my setup.

The OS used is Windows XP and Access versions accessing the database range from xp, 2003 and 2007 (it was developed in 2007 if this helps)

Any help would be greatly appreciated

Thanks
I have the same situation in a suite of databases I am developing, where you want the user to be able to add new records, edit some records, and leave others alone. There are sophisticated ways to solve this, using lots of code and the Access security engine, but a simpler way would be to add a field to each of your relevant tables called RecordComplete. Make this a yes/no required field, with a default of No.

Lets assume we are talking about 1 table only. This would need repeating for each table.

Create a form to display the data, allow edits, deletions, add new record.
Put RecordComplete on this form as an invisible control

You would have to write some code in the Before Update Event of the form that would validate the data entered and set RecordComplete to Yes if it is complete.

Then, for this form, instead of using the table as the record source, create a query that only selects records that are NOT complete.

This is your edit form, say frmMyTableEdit

Save a copy of the form as frmMyTableView and change the properties to no edit, no additions, no deletions and create a new query that selects records that are complete.

You now have two forms, one to edit, add, delete records, and a second to view completed records.

This can all be done on one form, changing properties at each current record but requires a substantial amount of code.

Hope this helps
Jul 24 '07 #2
missinglinq
3,532 Expert 2GB
What kind of controls are we talking about here that need to be filled in for a record to be complete? Text boxes, check boxes, comboboxes?

Welcome to TheScripts!

Linq ;0)>
Jul 24 '07 #3
What kind of controls are we talking about here that need to be filled in for a record to be complete? Text boxes, check boxes, comboboxes?

Welcome to TheScripts!

Linq ;0)>
There are a combination of text boxes and combo boxes. The result is in the form of a combo box that only has pass, fail and pending as the options. If the result is in as a pass or fail they should not be changing anything on the record.

Everything else that needs entered is a required field on the table so they get filled in anyway, so te only thing that would need to be edited is the result field.

Hope that made sense, been eating and sleeping this database for far too long now!
Jul 24 '07 #4
missinglinq
3,532 Expert 2GB
Still a little fuzzy, but let's call the control that holds the Fail/Pass/Pending status, well, Status! Then something like this should do:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.  If Status = "pending" Then
  3.    Me.AllowEdits = True
  4.  Else
  5.    Me.AllowEdits = False
  6.  End If
  7. End Sub 
Linq ;0)>
Jul 24 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: john smile | last post by:
When a workstation losts connection to server, it can leave an uncomplete transaction. Then SQL Server removes the transaction. Could anyone guide me how to set the delay before SQL Server do it...
5
by: Mark Feller | last post by:
I want to provide users a page where they can browse entries in a database 10 at a time, for example. I am doing this as a table, where each row is a database entry. I want to be able to give the...
3
by: lolo | last post by:
Hello everybody, We have a problem sending a file to the browser from our aspx. The problem is that the file received is uncomplete. The browser shows the first characters of the file. No...
2
by: Certys | last post by:
Hello, I have a form where I only allow new records to be added. I enable this by setting the form property "Data Entry" to Yes. I want to access other records in the same table- to autofill...
1
by: GraemeC | last post by:
I have a form where I have "Allow edits" set as no and "Allow additions" as yes. The form displays data in a continuous form. The user can add new records but can't edit returned records.I do however...
2
by: Matt | last post by:
Hi All, I have a form that was given to me to fix, so I do not have a ton of background here but I will do my best. Also, my form design experience is somewhat lacking, so here goes: ...
8
by: BASSPU03 | last post by:
I'm using Access 2003 on a Windows XP O/S. I've made two copies of Form1 so that there're are 3 forms: 1) Form1 2) Form2 3) Form3 Essentially, they all write to the same Table1.
4
by: corey11 | last post by:
I'm a very low-level developer with limited VB knowledge but nonetheless was able to put together a very user-friendly and extremely helpful Access 97 database for my company some 10 years back. We...
2
tdw
by: tdw | last post by:
I have a form which, when originally created, was solely for the purpose of viewing an order, not editing it (there was a different form for that), so the Allow Edits property was set to "No". But...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...

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.