Open with main menu and DELETE
Opening with the main menu form
To make the Access database open with the main menu form only do the following
1.) Click File --> Options 2.) Go to the "Current Database" tab 3.) Change the display form to the main menu form 4.) Save and close the database 5.) Open it up again to see what happens If you experience any issues and wish to bypass this simply hold shift when opening up the database |
Qry - Delete Records
Warning - Create a backup before continuing with this task
The database owner wants to ensure that you can delete records of students that are not enrolled with the click of a button. This is where we use queries, we can use queries to not only search for records, but we can also use them to delete records. Task - Create a delete query to delete the currently viewed records from the manage students form. 1.) BACK UP YOUR DATABASE (You don't want to have to reinsert your records because you last data) 2.) Copy the qryStudents and rename it qryDeleteStudents 3.) Change the type of qry to "delete" 4.) Add one more field to tell the query which table to delete the records from (See picture below) tblStudents.* tableStudents From |
You can turn off the warning with this command
DoCmd.SetWarnings False But be sure to turn it back on afterwards. Task - Link the query to a button
Create a button that says "Delete currently viewed data" Program it with this: DoCmd.OpenQuery "qryDeleteStudents" To remove the error messages type this in: DoCmd.SetWarnings False DoCmd.SetWarnings True |