Alison Balteramp;#039;s Mastering Microsoft Office Access 1002003 [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Alison Balteramp;#039;s Mastering Microsoft Office Access 1002003 [Electronic resources] - نسخه متنی

Alison Balter

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید



Using CurrentDB()


Microsoft offers a shortcut you can use when creating an object variable that points to the current database. Using the CurrentDB() function, you do not need to first point at the workspace; nor do you need to issue the OpenDatabase method. Instead, you set the Database object variable equal to the result from the CurrentDB() function, as shown in Listing 14.48.

Listing 14.48 Printing the Version of the Database Object

Sub UseCurrentDBFunc()
Dim db As dao.Database
'Point the Database object at a reference to the current
'database
Set db = CurrentDb()
'Print the version property of the database
Debug.Print db.Version
End Sub

This code sets the Database object variable so that it points at the current database object. You cannot use the CurrentDB() function to refer to objects that are not part of the current database. As with all VBA functions that do not require arguments, the parentheses after CurrentDB are optional.


/ 544