The File SystemObject

The FileSystemObject library provides another way to work with Windows folders (and files). To use the components of the object library in a database, you need to set a reference, in this case to the Scripting Runtime library, as shown in Figure 9.5.

If you don't see the Microsoft Scripting Runtime selection in the References dialog, you can get this library by downloading Microsoft Windows Script 5.6 (or whatever is the current version), plus the Microsoft Windows Script 5.6 Documentation files from the Microsoft Windows Scripting Downloads page at familyid=01592C4 8-2 07D-4BE1-8A7 6-1C4 0 9 9D7BBB9&displaylang=en.


Setting a reference to the Scripting Runtime library.

References - Files and Folders

Available References:


Microsoft Scriptinq Runtime licrosoft

□ Microsoft D Microsoft D Microsoft D Microsoft

□ Microsoft LJ Microsoft D Microsoft D Microsoft D Microsoft

Microsoft ! Microsoft

Scriptlet Library

Shell Controls And Automation

Smart Tags 2,0 Type Library

Soap Type Library

Speech Object Library

Tablet PC COM InkAnalysis Library, version

Tablet PC Type Library, version 1.0

TAPI 3,0 Type Library

Terminal Services Active Client 1.0 Type Lib

Tuner 1.0 Type Library

VBScript Regular Expressions 1.0

VBScript Regular Expressions 5.5

Priority jJ

Microsoft Scripting Runtime

Location : C : \Windows\system32\scrrun. dll Language: Standard

The Help file shown in Figure 9.6 (script56.chm) is a compiled HTML Help file. You'll find it very helpful, because it includes a Help book with full information on the components of the FileSystemObject, plus useful code samples.


The FileSystemObject Help file.


The FileSystemObject Help file.

A Digression on Access Help

In my opinion, Access Help reached its highest point in Access 3.1, when it was provided in the form of a Windows Help file, every bit of which was written specifically for the current version of Access, and was available without an Internet connection. In successive versions of Access, Help moved to the HTML format, which introduced the possibility of retrieving Help topics that were not relevant to Access (say from the MSDN Library that came with VB 6.0), because properties, methods, controls, and other objects may occur in many different Microsoft applications, although they may not (usually don't) work exactly the same. If you are trying to determine which properties of a Tab control will work on an Access form, it isn't much help if the Help topic you find is for a Tab control on an Office UserForm or a VB form.

Access 2007 Help is even less useful; it searches all of Office online (at least, if you are connected to the Internet; otherwise, you won't get any help at all), using a shamefully ineffective search engine. I entered "Tab control" into the search box in the Access Help window and got the list of topics shown in the following figure. Not a single one of them is relevant. One might think that Access doesn't support Tab controls, but of course that is not the case.

® Access Help - o i


| l^A; *

lob control - fi Search -

',zz-2:: Hone

Searched for: "tab control"

I Results 1-25 of top 100 Page: [1] 2 *3 4 • Next W ■

Help > Database basics

Inventory management database


^ Enable or disable ActiveX controls in Office documents

Help > Security and privacy

Help > Controls

Help > Forms

'®> Remove languages and fonts that you don't use

Help > Working in a different language

Help > Reports

'.<§!) Set default values for fields or controls

Help > Database design



Help > Automation and programmability > Properties

Create an input mask to enter field or control values in a specific format

Help > Database design

Show or hide multiple program buttons on the Windows taskbar

Help > Getting help > Using Microsoft Windows

gpl Up to speed with the 2007 Office system


@ Add, remove, or view a trusted publisher

Help > Security and privacy

Help > Saving and printing

Help > Datasheets > Fonts and formatting

All Access ^ Connected to Office Online


A list of inappropriate Help topics on searching for "Tab control."

There is a Table of Contents option in Access Help, but it is very sparse compared to the table of contents for Help in previous Access versions, and (curiously) it is quite different depending on whether or not you are connected to the Internet. Rather than giving full coverage of all the controls you can put on an Access form, the Controls heading (in the online version of the Table of Contents, and as shown in the following figure) has only four topics, covering only the most commonly used controls.



© Access Help

1 tab contiol * p Search *

Table of Contents


What's new


Getting started

Data collection

^Activating Access


Getting help


Automation and programmability


g) Add a text box control to a form or report

i^l Create a list of choices by using a list box or combo box

Display Yes/No values by using check boxes, option buttons, and toggle buttons

(g) Create a calculated control



.^Database basics

Database design

¡40 Datasheets


ci^Import and export

(^Filtering and sorting


^^ Queries


r^ Saving and printing

insecurity and privacy


The Controls book in the Access Help Table of Contents.

The offline version of the Table of Contents has a VBA Reference section, with a section on controls, and it does point to a Help topic for the Tab control — but the topic is not available offline! And in any case, Search won't find it.

Does that mean there is no help available for the Tab control? Not at all. I entered "Tab control on Access forms" into Google and got a page of relevant topics, starting with a very useful tutorial on using the Access Tab control. It isn't specific to Access 2007, but that doesn't matter because Tab controls weren't changed in this version. Note that some of the hits are from the Microsoft web site, so Access Help can't even find appropriate help topics in Microsoft's own Support files! My conclusion: if you need help for Access 2007, try Google.

Tab control on Access (aims - Google Search - Microsoft Internet Explorer - i|nJ|£j

File Edit View Favorites Tools Help

|©Badi'0-3a{h|P Search ^Favorites | & [5j ' □ W JEL

\ Address ^>n+Access-f|>' |3Go " ^ Ht£fl> t | v p search - . «* Highlight $ Options Ixl Pop-ups Blocked (1) -


___ Web Images Groups News Froogle Maps more» i-j £ [ P* Tab control on Access forms [ Search |


Web Results 1 -10 of about 24.100.000 for Tab control on Access forms with Safesearch on. (0.60 second


Access Tutorial: Tab Control

What is a Tab Control? A Tab Control is an Access object that allows you to create tabbed pages on an Access form. See picture below. ... php - Similar paaes

ACC2000: How to Use the Tab Control in Access


This article demonstrates how to use the tab control on a form in Microsoft Access. CAUTION: If you follow the steps in this example, you modify the sample ... - Similar pages

ACC2000: How to Use the Tab Control with Linked Subforms

This article applies to a Microsoft Access database (.mdb) and to a ... The tab control on the main form contains one of the linked subforms on each of its ... support.micro - Similar oaaes

Addina forms on tab control - MS Access

Adding forms on tab control, a discussion topic in our MS Access forum. Join us for more discussions on software, scripts, programming, MS Access and Adding ... -30k - Cached - Similar pages

Microsoft: Access Forms - How can vou control a tab

You said float it on top ot the tab control. How could I do that? ... DESCRIPTION: Microsoft: Access Forms technical support forum and mutual help system ... - 34k - Cached - Similar pages



«J £ Internet

Using Google to get help for Access.

There is another option for help, at least when you are writing VBA code: As shown in the following figure, you can use the Object Browser (opened by the F2 key in the Visual Basic window) to view components of the Access object model and their attributes. In previous versions of Access, clicking the yellow question mark button would usually open an appropriate Help topic. However, this is no longer the case in Access 2007. Selecting the TabControl object in the Access library and clicking the Help button just opens the main Help window, where you can search ineffectually for help on the Tab control, just as I described previously.



OLiject Browser a.

Access T 4 1

fti f

I A s


Members ofTabControl'

¡29 Printer •*

nip Application




23 Properties


23 Rectangle

nf DisplavWhen


l^1 Enabled

¡23 References

ei1 Eve ntP roc Prefix


^ FontBold

© Reports

llf Fontltalic

23 Screen


S3 Section

i^F FontSize


23 SmartTag


23 SmartTag Action


SmartTag Actions


23 SmartTag Properties


23 SmartTag Property

eS1 HorizontaiAnchor

23 SmartTags

Ef InSeiection


l^1 IsVisible

^ Left


eS* MultiRow

23 TempVars

nf Name

23 TextBox

& OldValue

23 ToggleButton

lli1 OnChange


^ OnClick


eSP OnDblClick


nf OnKeyDown


llP OnKeyPress

iii3 AcCommand

l^1 OnKeyUp

¿P AcControlType

Ei1 OnMouseDown


i^F OnMouseMove

](=?> AcCursorOnHover


i±P AcDataObjectType

^ Pages

¿P AcDataTransferType t

i^F Parent

j Class TabCoiitrol

Member ot Acms

Selecting an Access object in the Object Browser.

In Access 2003, clicking the Help button for the Tab control

in the Object Browser opened an appro-

priate Help topic.

U) Miciosoit Visual Basic Help

□ m. ^ a

Show Al

Ta b Co n tro 1 Co llectio n

See Also Properties Methods Everts

^Multiple object ;

A tab control contains multiple pages on which you can place other controls, such as text boxes or option buttons, When a user dicks the corresponding tab, that page becomes active.

Using the TabControl collection

With the tab control, you can construct a single form or dialog box that contains several different tabs, and you can group similar options or data on each tab's page. For example, you might use a tab control on an Employees form to separate general and personal information.

An Access 2003 Help topic for the Tab control.

0 0

Post a comment