For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

WhatsApp Widget

Control enabling and disabling functions

Assignment #2 – Parts 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 for navigation
  • Validate data provided by the user

This is anindividual assignment, on a bound form, using the Scuba.accdb database. All code must be converted from macro to VBA.

When the form loads, the user should be able to browse through the records on file, using a ListBox and navigation buttons, without being able to accidentally changing any data.

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 except Save & Cancel, and opening all data fields, except the key, for updating.

If the user wishes to add a new record, they would click the 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 abandon their edits or the new record, they would click the Cancel button, which would shift the form to browse mode as described above, and display the original record’s data before Edit or Add was clicked.

The Control Box, Navigation Bar and Selector Bar are hidden, and tabbing off the last field should stay on the current record so the user cannot break out of browse or modify mode in an uncontrolled manner.

Validation

When the user clicks Save, the current record is validated by a separate Validate method. If the record passes, the Save method saves the new/updated record to file. If the record does not pass the edits, all error messages are displayed at once to the user, one line per message, in either a form label or in a message-box pop-up … the data is retained on the form for the user to correct it.

  • A vendor must be selected.
    • The SelectedIndex on a drop-down (aka “combo box”) is -1 if nothing is selected.
  • Description must be at least 4 characters long, after being trimmed of leading & trailing spaces.
  • Cost must be greater than zero
  • ListPrice cannot be less than cost
  • Both cost and listPrice should display as currency, two decimal places.

Submission Instructions

Upload your database containing the form to the correct assignment folder on eConestoga by Monday October 19th at 11:59pm

Browse Mode

All buttons enabled, except Save & Cancel, no Control Box

Input fields locked, preventing accidental changes

Red label lblMessage for error & success messages

ListBox and Navigation buttons active, focus to ListBox or Next

Modify Mode (Add)

All buttons disabled, Save & Cancel enabled, no Control Box

Input fields unlocked, except key, focus to 1st input field

Tabbing off last field cycles to this record: no unintended saves

ListBox and Navigation buttons disabled

The post Control enabling and disabling functions appeared first on My Assignment Online.

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

Submit Your Questions to Writers for FREE!!

X
GET YOUR PAPER DONE