Home  aadconsulting.com_ 

Access Extra No 17 March 2003_

  Access Tools and Databases AAD CONSULTING Sydney Australia_ | _Advanced Access Development
     
 What's New

Changes at FreeAccess

I have finally registered the aadconsulting.com domain, and the FreeAccess site will be progressively renovated to reflect this.

The first change is this newsletter, which has been renamed and revamped. The content will remain essentially the same.

The url's - f
reeaccess.cjb.net and aadconsulting.cjb.net still work.

Office 2003

The Office 11 Marketing Beta was officially unveiled last Monday, with the final product to ship this Northern summer.

What's new with "Access 11"? an on-line article by Bill Ramos, Lead Program Manager, Microsoft Access and Excel

Office 2003: Should you upgrade? from ZDNet

Keep a Developer's Journal

A recent article on builders.com recommended that developer's keep a journal. One of the benefit's described was that with a detailed history of a project, "days, weeks, or months later, you'll be able to recall why you implemented a feature one way rather than another. Source code comments describe the end solution, but the journal describes every step you took to get there." Read the Article

The FreeAccess Access Control Center amongst many other features allows you to do just that for your Access projects. Try The Beta

Access KB Browser Article References Updated

A further 69 articles references, mostly for Access 2000, have been added, for a total of 2,166 articles. Download the updated database from http://www.aadconsulting.com/kbbrswer.html

The new articles are also listed in the New KB Articles section of the newsletter.

 Tips
Create a Default Control

In Design View, set the default for a form or report control by displaying the Properties dialog box. Click the Toolbox button for the control. The Caption of the Properties Dialog will change to "Default for [Control Type]". Change the control attributes as required.

Get more tips, samples, articles and code from the

FreeAccess Access Utilities CD

Check for Run Time Access

Function IsRunTime() As Boolean

___Dim varReturn As Variant

___'Returns True (-1) if a run-time version of Access is running
___varReturn = SysCmd(acSysCmdRuntime)

___IsRunTime = varReturn

End Function

VBA Tips

Use Early Binding
When using object variables, wherever possible, declare the actual type of object instead of the generic Object variable to take advantage of the performance gains provided by early binding.

For example, Dim frm as Form instead of Dim frm As Object.

Use For Each... Next
When going through object collections, using For Each.. Next is much faster than using For... Next.

Using For Each.. Next, VBA needs to locate the address of the object variable only once, at the beginning of the loop, while For... Next de-references the object variable in the body of the loop on each iteration.

Use the Nz function to convert null to zero

In this example from the Access97 Help file, the NZ function converts a null value to zero, and the optional argument provides the string to be returned if varFreight is Null:

___varResult = Nz(varFreight, "No Freight Charge")

Search for Nz Function in Access Help for more information.

Get the Description for an Error Number

Use the AccessError method of the Application. object to return the descriptive string associated with an Access or DAO error:

___strstrErrorString = AccessError(lngError)

Using Access 2000/2002 Help

We all know how useless the Help Files are in Access 2000/2002. For example, typing AccessError in the Index tab of Access97 Help brings up AccessMethod. But try the same search in Access2000/2002, and you can't even type AccessMethod in the Index tab, and the Answer Wizard returns [Please rephrase your question] :(

I use this workaround. Open the Object Browser. Make sure <All Libraries> is selected in the top combobox. Enter your search string in the second combobox and hit <Enter>. The keyword will be highlighted in the appropriate section of the Browser. Hit F1 to open the Help file entry for that keyword :)
___s

Dialog Shortcuts

Select a folder in the Open or Save As dialog box (File menu)
(to select the folder list; arrow keys to select a folder)
ALT+0
Choose toolbar button in Open or Save As dialog box (File menu) ALT+ number
1 is the leftmoist, 2 the next, and so on
Update files visible in the Open or Save As dialog box (File menu) F5
Switch to next tab CTL+TAB or CTL+PageDown
Switch to the previous tab CTL+SHIFT +TAB or CTL+PageUp
Perform the action assigned to the default button ENTER
 Downloads
Third party Add-On Tools Access
 Code Samples
imdFind Out if a Windows Application is Open
Enter the following code in a new module:

Option Compare Database
Option Explicit

'
Use the API function FindWindow to determine whether an application is already running.
'
Useful for OLE automation.
Declare Function FindWindow Lib "user32" Alias " FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

'
Custom Declare statement that uses the FindWindow API call
'to find a window of the specified class.
'Pass a long NULL pointer for the window name.

Declare Function FindWindowByClass Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As Long) As Long

'Class names for some common applications:
'Access: OMain
'Excel: XLMAIN
'Word: OpusApp
'PowerPoint: PP97FrameClass
'Visual Basic: ThunderForm
'Binder: BinderFrame
'Visio: VisioA

Dim mblnRetVal As Boolean

'Example: find Word.
Public Function fnFindMSWord() As Integer

___Dim lngRetVal As Long
___Dim strMSG As String

___lngRetVal = FindWindowByClass("OpusApp", 0&)
___If lngRetVal <> 0 Then ' Word already open
______fnFindMSWord = True
___Else ' Word not open
______fnFindMSWord = False
End If

End Function

 Useful links
Is Database Security an Oxymoron?
Strong encryption alone doesn't provide database security. An interesting on-line article from Access guru, Mary Chipman.
Access Links For Developers
TechiWarehouse - Home
Free Help Authoring and Documentation Writing Tools
KeyWorks Software
Office Developers Only Office FAQs
Baarns Consulting Microsoft Office Resource Center
ACG Soft - MS Access Developer Tools
vbAccelerator Icon and Cursor Library
LangaList Home Page
 Coming soon...
  • A new version of the SmartForm Wizard that will create a lightweight form with zero code behind it, intelligent navigation buttons, and a standardised global code module.
  •  XML Explorer Add-In Explore XML documents with this Access Add-In As XML documents are structured as trees of data., with this tool  you can did down into XML data using a Windows Explorer like interface.
  • An Access add-in that will significantly improve on the Access Edit SQL Window.
   New Access KB Articles
     

Q248933

ACC2000

Error When You Type in a List Box That Is Based on a Text Field That Has a Format Character Defined

Q209924

ACC2000

"Could Not Find Object" Error Importing MS Excel File

Q207615

ACC2000

Error Using More Than 2000 Characters in Wherecondition of OpenReport

Q208929

ACC2000

Can't Change Ownership When RunPermissions Set to Owner's

Q208826

ACC2000

How to Disable PAGE UP and PAGE DOWN Keys in a Form

Q208840

ACC2000

How to Use Code to Change a Report's Printer

Q208908

ACC2000

Dirty Property Not Recognized on Unbound Forms

Q208822

ACC2000

How to Create a Top Values Per Group Report

Q299908

ACC2000

Fields May Appear to Be Missing in a Replicated Database

Q207703

ACC2000

FileCopy Statement May Not Copy Open Files

Q326605

ACC2000

Issues Fixed in Access 2000 by Office 2000 Service Pack 3

Q248945

ACC2000

The TextWidth Property Returns Incorrect Results

Q248956

ACC2000

Compilation Errors and Extended Characters in Module after Converting to Access 2000

Q209032

ACC2000

How to Delete Objects Programmatically

Q248932

ACC2000

Fatal Error Message When You Close a Form After You Set the UniqueTable Property

Q207795

ACC2000

"W" Option of the DateDiff() Function Does Not Work

Q248934

ACC2000

Find and FindRecord Do Not Find Null Values in Some Data Types

Q248923

ACC2000

Erroneous Error Message When You Delete Data Access Page

Q248928

ACC2000

Incorrect OnCurrent Field Property in Macro That Is Converted from Access 2.0

Q248930

ACC2000

Objects List Takes Longer to View in Database Window

Q248904

ACC2000

Error When You Close a Form That Has a Combo Box That Is Based on a Parameterized Query

Q248909

ACC2000

Error Message When You Change the Properties on a Replicated Table That Has a Decimal Column

Q296848

ACC2000

Breakpoints Are Ignored in Visual Basic for Applications Code

Q810415

ACC2000

Access 2002 Format Database Bloat Is Not Stopped by Compacting

Q248894

ACC2000

You Cannot Open or Convert an Access 97 Database

Q248898

ACC2000

Saving a Report to Different Format Reverts to First Instance of Report

Q248632

ACC2000

Table Columns Are Not Displayed in View Designer

Q245467

ACC2000

When You Sort Parameter Query Results You Are Prompted for Parameters Again

Q247486

ACC2000

Using the ADOX Catalog Object on a Table Object Erases Field Properties of Each Query That Uses That Table

Q248961

ACC2000

You Do Not Get the SaveAll Dialog Box After You Compile Even If You Have Changed Multiple Forms or Reports

Q248970

ACC2000

Invalid Page Fault When You Try to View Class Module in Design View

Q812617

ACC2000

Access 2000 Data Access Pages May Appear Blank or Return Errors or Request Web Components

Q210178

ACC2000

Contents of the Readme File

Q248095

ACC2000

Error When You Add Record to a Form That Is Based on a Stored Procedure

Q256200

ACC2000

How to Use the PPmt Function

Q252749

ACC2000

Access May Stop Responding When You Click the Advanced Button in the Import Wizard

Q252739

ACC2000

Euro Symbol Is Not Printed Properly on a Computer Running Windows 98

Q252742

ACC2000

Subdatasheets Print or Preview Incorrect Data

Q248968

ACC2000

Transaction Rollback Causes Recordset Cursor to Be Lost

Q209496

ACC2000

"Undefined Function" Error Message Referencing Column Property

Q199056

ACC2000

Unable to Use FindFirst to Retrieve Value with Apostrophe

Q199066

ACC2000

How to Retrieve the Path for Linked OLE Objects

Q198637

ACC2000

Access Methods That Reset The Visual Basic Project

Q197108

ACC2000

Report Based on Query Has More Records Than the Query

Q209191

ACC2000

Using Format() and Month() Returns Incorrect Month

Q197223

ACC2000

Setting ControlBox Property of Form to No Disables Menu

Q248965

ACC2000

Changing Database Properties Can Cause Lost Objects in Access Projects

Q248966

ACC2000

Unexpected Data in List Boxes, Combo Boxes, and Reports of Access Project

Q209743

ACC2000

How to Use DLookup to Look Up Values in Forms or Reports

Q209605

ACC2000

Incorrect Results Received with DSum() Function

Q209653

ACC2000

Concatenating Fields in a Text Box to Remove Blank Lines

Q209667

ACC2000

Explanation of the KeepTogether Property for Sections

Q209719

ACC2000

DDE Statements Invalid in List Box or Combo Box Control

Q197222

ACC2000

Web Toolbar Does Not Reopen When Following Hyperlink

Q248980

ACC2000

Format Property of "**$#,##0.00" Is Changed to "**" in Access 2000

Q209218

ACC2000

Error with Linked Crosstab Subform or Subreport

Q299257

ACC2002

Breakpoints Are Ignored in Visual Basic for Applications Code

Q307422

ACC2002

Exporting as XML from Access 2002 Produces WC3 2000-Compatible Schema

Q328933

ACC2002

Numbers That Are Copied From Access 2002 Paste As Text in Excel 2002

Q295250

ACC2002

Error Inserting Row into Multi-Table View or Function

Q322676

ACC2002

Update Query Still Modifies Records After You Cancel the Query

Q160892

ACC95

Including Briefcase Replication in a Custom Application

Q158933

ACC97

Error Message: Isn't an Index in This Table

Q171583

ACC97

HOW TO Fill a 32-bit VBA Array of UDType via a Visual C++ DLL

Q178070

ACCESS

HOW TO Handle Quotes and Pipes in Concatenated SQL Literals

Q811120

ACCESS

Access May Cause an Error When You Open or Delete or Compact Linked Tables

Q811860

ACCESS

BUG - Enter Parameter Value Dialog Box Appears While Trying to Close a Form Window by Using the Exit Command Button Which Executes DoCmd.Close VBA Code in Access 2000 and Access 2002 with Windows XP

Q312412

ACCESS

Send To Mail Recipient Option Appears Dimmed

Q205425

MOD2000

How to Change Options for a Custom Application by Using the SetOption Command

- Back Issues

 

No 16 February 2003
No 15
December 2002 / January 2003
No 14
November 2002
No 13
October 2002

Download a Searchable Compendium of Issues 1-12  

Visit our Link Partner:
Superior Software for Windows
Access, SQLServer and .NET Downloads

http://www.ssw.com.au
Top

Top

Editor: Tony D'Ambra
CONTENTS:
What's New
Tips
Downloads
Code Samples
Useful links
Coming soon...
New AccessKB Articles
Back Issues

Subscription to this newsletter is free.

This newsletter may contain links to sites or files on the Internet which are owned and operated by third parties. AAD CONSULTING is not responsible for the content of or files from any such third-party site.

Any files are provided "as is", without warranty of any kind. AAD CONSULTING does not assume any liability for use or the consequences of use.

To subscribe or unsubscribe from this mailing list, select a choice from combo-box below, enter your email address and click OK:

Have questions or comments?
Send them to us.

Access is a trademark of Microsoft Corporation.

©2001-2003
Anthony D'Ambra.
All rights reserved.

Top