Full Version: Data Entry In Forms
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
JOEB1
Hi All,

I have created a form to enter data into a table. As soon as the information is entered into the form it is populated into the table. Is there a way to hold the information in the form so the user can review his input prior to committing the information into the table.

Thanks for your assistance.

Joe B.
CyberCow
Have you tried to use an unbound form to do simple data entry? Nothing is committed until you click a "Submit" or "Commit" button that houses a VBA function to run an append query based on the form's unbound controls.

hope this helps
missinglinq
Sorry, moo-man, but I've got a 'beef' with that! Using an Unbound Form, especially for a newbie, is really overkill when all they're trying to do is some simple validation or review of the entered data, before committing it.

CODE
Private Sub Form_BeforeUpdate(Cancel As Integer)

If Not (Me.NewRecord) Then
If MsgBox("Would You Like To Save The Changes To This Record?", vbYesNo + vbDefaultButton1, "Save Changes to Record ???") = vbNo Then
  Me.Undo
End If
Else
If MsgBox("Would You Like To Save This New Record?", vbYesNo + vbDefaultButton1, "Save This New Record ???") = vbNo Then
  Me.Undo
End If
End If

End Sub

Linq ;0)>
Kamulegeya
QUOTE (missinglinq @ May 18 2012, 10:54 AM) *
Sorry, moo-man, but I've got a 'beef' with that! Using an Unbound Form, especially for a newbie, is really overkill when all they're trying to do is some simple validation or review of the entered data, before committing it.

CODE
Private Sub Form_BeforeUpdate(Cancel As Integer)

If Not (Me.NewRecord) Then
If MsgBox("Would You Like To Save The Changes To This Record?", vbYesNo + vbDefaultButton1, "Save Changes to Record ???") = vbNo Then
  Me.Undo
End If
Else
If MsgBox("Would You Like To Save This New Record?", vbYesNo + vbDefaultButton1, "Save This New Record ???") = vbNo Then
  Me.Undo
End If
End If

End Sub

Linq ;0)>


Hello

Interested in your solution

But can it work on main form/subform set up?

Ronald
CyberCow
Well there's right, and there's temporary . . . . take your pick.
JOEB1
You are correct. I just want the users to have a chance to review and validate the information prior to entering into the table.

Where do I put this code? On a control button? and where you have Button1 I would put the name of the control button?

Thanks for all your help.
JOEB1
Sorry, one more question. Is this going to come up after every record is entered? Is there a way for the users to enter multiple records before having to validate?

Thank you
Alan_G
Hi

QUOTE
Is there a way for the users to enter multiple records before having to validate


Yes, but you'd need to use either a temporary table or possibly a disconnected recordset. You'd perform your validation(s) on the local temporary table or memory resident records before appending them to the actual main table(s).

It's perfectly doable but obviously it gets a bit more complex as you add the different layers to what you're wanting to do wink.gif
JOEB1
How do you set up a temporary table?
JOEB1
What would be the VBA function to get the information from the unbound form into the table?
Alan_G
Hi

As I mentioned above, all the things you're wanting are perfectly doable, but from the nature of the questions you're asking I'm guessing that you're just starting out with your journey into the many wonders of Access. That being so, it's probably a sensible time to maybe take a step or two backwards and start with the single most important part of your project, and that's the table structure that you currently have wink.gif

Before trying to help you out with what you're wanting to do, it would help us to help you if you posted a listing of your current table(s) and how they relate to each other, or if it's easier for you then you can upload a copy of your db (zipped to less than 2meg and just test data in in) with an explanation of what you're modelling so someone can take a look for you and make sure you have a solid foundation before going any further
JOEB1
Here is the db. Thank you for your help.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.