O'Reilly logo

Access 2010: The Missing Manual by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 icon. That’s why some people ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required