Using Objects
Now that youâve learned the basics of Visual Basic, youâre probably itching to get to work with some practical code. The following sections present two examples that put control objects to work.
Tip
If youâre eager to explore even more objects, you can find an object-by-object reference in the Visual Basic Help. To get there, choose HelpâMicrosoft Visual Basic Help. (If you see a message stating âThis page is unavailableâ, then click âConnected to Office.comâ at the bottom-right corner of the Access Help window, and choose âShow content only from this computer.â) To get to the object reference, click the Access Object Model Reference link.
Indicating That a Record Has Changed
Record editing is a two-stage process. First, you change one or more field values, which places the record into Edit mode. Then, you close the form or move to another record, which commits your change. Or you press Esc, which cancels your changes, and then reverts to the original values.
If youâre using the Record Selection bar (meaning the Record Selectors property of the form is set to Yes in the Property Sheet, which is the standard setting), Access indicates when youâre in Edit mode by changing the tiny arrow in the formâs top-left corner to a tiny pencil icon. This icon is a helpful indicator that something has changed on your form and that you need to decide whether to go through with the update. However, Access newbies and pros alike can easily miss the tiny pencil ...
Get Access 2010: The Missing Manual now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.