Table records can become outdated or need to be deleted. In this video, learn how to delete the current record.
- When you manage a database, you should delete…any table record you're certain that you no longer need.…For example, if a customer places an order…and then calls back immediately to cancel it…you should delete the order.…In this movie, I'll show you…how to delete a record using VBA.…I'm working in the course database,…and I've opened the Customers table.…And what I want to do is to add a record…that I will delete in a moment.…To add a record to the table, scroll down,…and I'll click in the first open customer number cell,…type 101, that's the customer number,…and for the customer first name I'll just type Test.…
And then press Tab to move through all the fields,…and with that record in place,…I can now move to delete it.…To go to the Visual Basic Editor,…I'll press Alt + F11,…and then I need a new code module…so I'll click Insert, Module.…Now I can define a subroutine that will…delete a record that I find using the Find First method.…So I'll start by naming the subroutine,…I'll just call it Sub DelRec, short for Delete Record,…
- Working with macros
- Running a VBA procedure
- Debugging VBA code
- Defining variables, constants, and calculations
- Displaying a calculated result in a message box
- Repeating tasks with loops
- Manipulating database objects
- Adding, editing, and deleting records
- Looking up values in a table
- Automating processes with macros
Skill Level Advanced
What you should know1m 38s
1. Introduction to Visual Basic for Applications
2. Define Variables, Constants, and Calculations
3. Add Logic to Your VBA Code
4. Debug Your VBA Code
5. Manipulate Database Objects Using DoCmd
6. Read and Manipulate Table Data
7. Manipulate a Database Using the Application Object
8. Control Forms and Reports Using the Me Object
9. Automate Processes Using Macros
Next steps1m 7s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.