Display list of records entered and allow edits - MS Access
Posted on 2016-10-18
I have an Access form (Form1) for adding records to MyTable. It contains textboxes and comboboxes for data entry and a command button for adding records.
MyTable is not bound to the form.
There are restrictions on what can be entered into some of the textboxes and comboboxes. Some of the restrictions are based on what was entered in other textboxes and comboboxes. As an example, if textbox1 contains a value of ‘Cash’, then combobox1 cannot contain a value of ‘Not Applicable’. Another example is that the date entered into textbox2 cannot be greater than the current date, etc, etc.
All of the various checks of the textboxes and comboxes are done through code when the ‘Add Record’ command button is clicked. If everything is ok, then a record is added to MyTable.
What I’d like to be able to do is:
After the user has entered all of the records (s)he wants to in one sitting, have him/her click a command button that will display a list of all of the records (s)he entered. This will give him/her the opportunity to to review what was entered and to make any necessary record edits or deletions before printing the list of records entered (which will serve as finalization of that batch of records).
1. How do I display the records that were entered in a list (datasheet?) format? For space purposes (Form1 is too crowded), I’m planning
on using a second form (Form2) for the review/edit process.
2. How do I allow the user to select a particular record for editing? If (s)he just goes to the list (presuming I’m displaying a list of all of
the records entered into the table) and edits the record there, then none of the error/validation checks that Form1 is used for will be
performed. So, I guess what I’m asking is how do I allow a user to select a particular record (on Form2) and once (s)he does, switch
back to Form1, have all of the boxes on Form1 populated with the field values from the selected record. That way, any necessary
changes can be made and then an ‘Update Record’ button (on Form1) can be clicked to modify the record.
I wrote a lot but all I’m really asking is after a user has entered a batch of records, how do I allow him/her to review a list of the records
(s)he entered and give one last chance to make any edits/corrections before finalizing.