I dont know what I want is called

RichardP1978

Registered User.
Local time
Today, 07:00
Joined
Nov 14, 2006
Messages
89
What I want to do, is have an unbound form, user enters data in to it, then clicks on a 'save' button which then writes the data to a new record within a table

I have got no idea what it is called so find it hard to do the search.
 
what you mean exactly?

try the words RecordSource, DataSource, Save Register

Be more especific. What do you want to do?
 
If you create a CommandButton with the wizard, there is a "save" option that'll create it for you

Why you'd want to do this is a mystery

Col
 
OK, I thought I had explained it enough. Although some seem to think I am barking mad, and given my head is full of cold, you are probably right.

The form is intended to be filled IN FULL before the changes can be written to the database. It is to ensure that the record is saved all at once.

I do not want the information the user enters in to the form saved until they have filled the entire form in.

The problem is, the data has to be stored in a specific way as it is a legal requirement of the business we are in. I do not want to end up going in the data, and editing things because the user couldnt be bothered to enter the data following validation rules which could then end up with loads of records, which are next to useless.
 
right check the samples for this
really what you are after is a number ref to each record with no gaps
right ?
1,2,3,
THE AUTONUMBER WOULD ALLOW FOR GAPS

if so
this was discussed in depth and you need to look at the samples for an answer ie the ref number is only assigned at the completion of data entry

you could do this on a completed button which then would assign the next number avaibale (pretty easy this ) but some bright spark came up with a better option , that did this automacitally (??) -- check the samples
 
You can bind the form to a query based on the table as normal and then use the form's BeforeUpdate event to ensure that all the data necessary to enter has been entered before the record gets saved to the table.
 
To do this right, you need to have a little flag inside your form, probably in VBA code, that after the update of each field, if it is correctly formatted, sets a Boolean flag to TRUE. Then in the BeforeUpdate of the FORM (not the fields), do the logical AND of all of the flags. If you don't come up with TRUE, Cancel the update.

To make life easy, implement two buttons on the form.

Button 1 is the UPDATE button, and there is a wizard for this one. But I think the wizard assumes you have a bound form.

BUtton 2 is the UNDO button, which clears the form and does not update the underlying recordset.

I understand why you might wish to use an unbound form. I've had to do that myself from time to time, for more or less similar reasons.

Please be advised that if GaryPanic is correct, even this method will not be immune to numbering gaps unless you take very firm steps to prevent record deletion once the record is entered.
 
It's not only in the before_update Event you need to check but any button and don't forget the close-event
 
Thanks for the replies.

I am not too concerned about there being number gaps in the table for its record id's, it more a case of ensuring that there is data in the fields where data is being inputted which is more of a concern. For example, we have to record when there is a significant event within the home.

So we have to record who, where, why, when, what etc. Sometimes on the paper system people do not fill in all the neccessary information on the form, so I can see the same happening, so I will want to take those steps to stop that and ending up with loads of blanks within the table for information which should be inputted. The thing is when we get inspected, which can be unnanounced, this information will be requested, and if we cant give it to them without going through the records to make sure there is information where there should be, we would be in trouble.
 
Dennisk said:
It's not only in the before_update Event you need to check but any button and don't forget the close-event
Not so, the BeforeUpdate event of the form in conjunction with Cancel = True is the correct place for validation
 
This is a lot easier to do now you have gone into a bit more detail
bind your form to a table and what you need is a check that all the fields have been completed and you would do this on the exit button (you might have to remove the close form options little x in the top right hand corner)
see samples on how to do this

g
 
We have to record deaths is a particular way, but for people not savvy to the regulations governing care homes think of it as an accident book. If anyone has seen one and/or filled one in, you know there is a great deal of information it does request. Some of it might not neccessarily be forthcoming, but if you apply your mind to it, there is something you can put in each and every section of the paperwork.

We would rather be told off for the information put in to the form is incorrect, than not existing at all, as then we cant be said to have no system in place, we can only be told its not adequate enough to meet the regulations. You can never fully rule out luser error!
 
RichardP1978 said:
We have to record deaths is a particular way, but for people not savvy to the regulations governing care homes think of it as an accident book. If anyone has seen one and/or filled one in, you know there is a great deal of information it does request. Some of it might not neccessarily be forthcoming, but if you apply your mind to it, there is something you can put in each and every section of the paperwork.

We would rather be told off for the information put in to the form is incorrect, than not existing at all, as then we cant be said to have no system in place, we can only be told its not adequate enough to meet the regulations. You can never fully rule out luser error!


Regulations Ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh. i have FSA - blinking nightmare - never good enough, but they will never tell you want they want
B*rstards
 
GaryPanic said:
Regulations Ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh. i have FSA - blinking nightmare - never good enough, but they will never tell you want they want
B*rstards

Indeed!

Off topic I know, but the trouble with the inspectors is that there are no hard and fast rule of do they have this, yes, do they have that, no etc. Wether or not we meet the standards and regulations is all down to the individual inspectors interpretation of the standards and regs, so as you can imagine, what is good for one, is often not good for another.
 
Rich,

In several of the dbs I have created recently I perform a validation check of required fields in the Before_Update event of the form. However when aI record is amended, users may remove required fields then click a close button and it that case the before_update does not seem to be fired hence the check when the db is closed.

Many task in Access may be accomplished in a variety of ways, so my technique may differ from yours but from my point of using my implementation I require the check to be performed in the close-event as well.
 
Rich,
Just tried that, Opened the db removed and required field, pressed ct/alt/del , db came back with a message, then windows closed down. Upon re-opening the db, the amendment was not actioned therfore preserving all the required fields.
 
GaryPanic said:
right check the samples for this

I have trawled through the samples, and cant seem to find what you say look for. Do you recall which sample has the clues I need?

Thanks.
 

Users who are viewing this thread

Back
Top Bottom