You are on page 1of 3

Assignment # 2 – Publishers Form

After successfully completing this assignment, you should be able to:

 Develop a process typically used in master file maintenance


 Control enabling and disabling functions available to the user
 Use a ListBox or ComboBox for navigation
 Validate data provided by the user
 Understanding Relationships
This is an individual assignment, on a bound form, using the Publishers DB.accdb database. All code
must be converted from macro to VBA.

Guidelines
When the form loads, the user should be able to browse through the records on publishers file using the
Publisher’s name ListBox and the navigation Buttons, without being able to accidentally changing any
data.
The Subform, displays the list of books present in the book’s table, against the publisher name or ID
selected at that particular instant.

If the user wishes to change the current record, they would click the Edit button, which would change
the form into modify mode, disabling navigation and all buttons, and opening all data fields, except the
key, for updating. The user can then edit the record and click save button to save it.

If the user wishes to add a new publisher, they would click on Add button, which creates a new empty
record, clearing the form, and changes the form into modify mode as described above.

When the user is finished and wishes to save the modified/added record, they would click the Save
button, If the record passes validation, it’ll save the record to the database and shift the form back to
browse mode: locking the inputs, enabling navigation and all buttons except Save and Cancel.

If instead the user wishes to delete any record, user can navigate to the record, that needs to be
deleted, they would click the Delete button, and that record will be removed from the table.

Browse Mode Modify Mode (Add)


List Box: When you select a Edit Button: All buttons
Particular Publisher’s name here, disabled, Save & Cancel
all the information related to that enabled, no Control Box
publisher is displayed and in the
Input fields unlocked, except
sub form, all the books for this
key, focus to 1st input field
publisher are listed. e.g. Book Title,
Type, Price, etc. Tabbing off last field cycles
to this record: no
You can navigate through the
unintended saves
record using navigate buttons.
ListBox and Navigation
buttons disabled
Hint:

This assignment is divided into three parts. You can


1. Create a Main Form that is associated with the Publisher’s table
2. Create a Sub Form that is associated with the following tables

3. In addition, Sub form is based on a query, that shows all the information that has been
displayed in your final output form displayed above.
4. The pub_name in the form design is “unbound”
5. Make sure to add to the VBA so the sub form will load
Private Sub Form_Load()
Browse
End Sub

Hand In
Upload your database containing the form to the correct assignment folder on eConestoga.

You might also like