Oh Buggeration

BRABUS

Registered User.
Local time
Today, 12:14
Joined
Nov 27, 2008
Messages
36
Ok I know I have read posts on here somewhere about having a form to enter data in that doesnt update a table at all until you tell it to save the info.

I have tried searching but cant remember what to search for (now where is the smiley for being a moron?)

Can anyone give me some me some pointers PLEASE.
 
Most likely unbound data entry forms... however you can use code similar to this on a Save button:

Dim db As DAO.Database
Dim rst as DAO.Recordset

Set db = CurrentDb()

Set rst = db.OpenRecordset("TableName")

rst.AddNew
rst("FieldName1").Value = txtField1
rst("FieldName2").Value = txtField2
etc...........
rst.Update

If you're looking for an edit, you need to use rst.Edit and you will also have to find a way to search for the existing row within the recordset. At this point a select query is most likely a better recordset than just opening the table itself.

Hope this helps.
 
cheers, it gives me a pointer. I will have a dig round for some full blown examples now you have guided me.
 
Just to point out that you can still bind the form to a table and prevent any edits being committed by placing your validation in form's BeforeUpdate event and canceling it if validation fails.
 
Just to point out that you can still bind the form to a table and prevent any edits being committed by placing your validation in form's BeforeUpdate event and canceling it if validation fails.

ooo now that sounds interesting. All I am trying to do is to stop people moving to the next record by tabbing or using the page up or down keys if they havent entered data in all the required fields.

Give us a clue then ;)please
 
Last edited:
Ah, then you would look at Ghudson's Better Mousetrap, which is posted somewhere on forum. Search for it; he made a sample demonstrating this.
 

Users who are viewing this thread

Back
Top Bottom