HomeAccess Extra No 26  

                                                    February 2004_
_aadconsulting.com
  Last Issue - Now visit the Access Extra WeBlog
for the latest MS Access tips, articles, code, downloads, and links...


 

 
 What's New

bullet Super Slick Access Switchboard

I recently received my trial copy of Office 2003. The new WinXP-themed gui looks great. Pity Microsoft didn't updated some other features.

The Switchboard Manager produces the same boring Switchboard that first shipped with Access 95. I like the look of the new WinXP-style switchboards, and thought I could replicate it not only in Access 2003, but in Access 97/2000/2002 as well.

This is what I came up with:

Super Slick Switchboard

The Switchboard uses the native Switchboard Items table and enforces SDI navigation, with reports previewed inside the Snapview control.

You can download a demo and buy the source code.

bullet Changes in Business Model

As telegraphed at the end of last year, my previously free Access add-ins and wizards are now only available to buyers of a premium product.

Most subscribers to this Newsletter, and the many thousands of visitors to aadconsulting.com who download files, do not support the site by buying a premium product.  This situation was unsustainable.

bullet Office 203

More XML - many articles on this important subject from DevX

  Tips

CD

More tips, samples, articles & code on the

Access Utilities CD
New v4.0

bullet CommandBar Trick

This is something I recently discovered. You can add built-in Access menu commands to custom commandbars.

Normally, in the Customize dialog, if you drag a built-in menu to a custom commandbar and make changes to any if its submenu items, the changes also occur in the built-in commandbar that the menu-item comes from. To fix this, you need to reset the built-in commandbar and lose the changes in the custom commandbar.

The workaround is, after dragging the menu item to your custom commandbar:

  • Drag each submenu item onto the custom commandbar.
  • Remove the depleted menu item from the the custom commandbar.
You can now use/customize each native submenu item without affecting the native commandbar.

bullet  Resize Form Controls

You can use the InsideHeight and InsideWidth properties of an Access form to dynamically resize controls at run-time. A form's Resize event as well as firing when a user resizes a form, also fires when a form is loaded.

For example, this code will resize a sub-form within a resized form:

Private Sub Form_Resize()
On Error GoTo ResizeError

    'Turn off screen redraw  
    Application.Echo False
        Me!subfrmTest.Height = Me.InsideHeight -30      

        Me!
subfrmTest.Width = Me.InsideWidth - 30
    'Turn screen redraw back on
    Application.Echo False

Exit Sub
ResizeError:

   
' NB: Turn screen redraw back on if an error occurs!
    On Error GoTo 0
    Exit Sub
       
End Sub


bullet  What's in the .ldb file?

For every Access database opened for shared use, an .ldb file is created to store computer and login names, and to place extended byte range locks. The .ldb file always has the same name as the opened .mdb and is located in the same folder.

The Jet database engine uses .ldb file information to prevent users from writing data to pages that other users have locked, and to determine who has other pages locked. If Jet detects a lock conflict with another user, it reads the .ldb file to get the computer and login name of the user who has the file or record locked.

In most lock conflict situations, Access raise a generic Write conflict message that allows you to save the record, copy it to the Clipboard, or drop the changes you made. In some circumstances, you may receive the following error message:

Couldn't lock table <table name>; currently in use by user <security name> on computer <computer name>.
    _Downloads
    TechRepublic - How Do I Resource Center
     
    The Access Web - APIs Index of Articles
     
    TopXML, XML Products, XML Developer Library
     
    Using Dates and Times in Access 2000
     
    VBDiamond Visual Basic Portal
     
    Planet SourceCode
     Code Sample

    Create a Hybrid Text/ComboBox

    1. In the form create a TextBox that sits exactly over the ComboBox

    2. Set the ComboBox's Visible property to False

    3. The TextBox is Visible and holds a value according to needs of the application: it may be a bound control or, as in the sample code below, unbound with the value assigned on the Form_Load event.

    4. Clicking on the TextBox hides it and displays the ComboBox. After the user has updated the ComboBox, the value is assigned to the TextBox and the ComboBox hidden again.


    Private Sub Form_Load()
        Me!txtHideShow.SetFocus
        Me!txtHideShow.Text = "Test"
    End Sub

    Private Sub txtHideShow_Click()
        Me!cmbHideShow.Value = Me.txtHideShow.Value
        Me!cmbHideShow.Visible = True
        Me!cmbHideShow.SetFocus
        Me!txtHideShow.Visible = False
    End Sub

    Private Sub cmbHideShow_AfterUpdate()
        Me!txtHideShow.Value = Me.cmbHideShow
        Me!txtHideShow.Visible = True
        Me!txtHideShow.SetFocus
        Me!cmbHideShow.Visible = False
    End Sub


    Useful links

    Recent Access2003-related Technical Articles from MSDN:

    Perform Mail Merges Using XML Data in Microsoft Office Access 2003
    Perform a mail merge programmatically from Access 2003 using an external XML data file and the Mail Merge feature of Word 2003.   

    Animating Microsoft Office Access 2003
    Add animation to Access forms using the Animation ActiveX control, the Timer control, and animating the Office assistant.   

    Access 2003 Best Practices in a Multi-user Environment
    Improve the performance and efficiency of working with your multi-user Access applications.   

    Deploy Complex Access 2003 Runtime-Based Solutions
    Use the Package Wizard in the Access 2003 Developer Extensions to create packaged Access solutions.   

    Automate Access 2003 from Visual Basic .NET
    The features and capabilities of the Access object model 

    New XML Features in Microsoft Office Access 2003
    Importing and exporting XML data.   

    Create Word 2003 Documents from Any Version of Access

    • Access Copy Protector An Access application that copy protects an .mde, so that it will run only on the machine that it is installed on. 
    • Ezy Data 4 Create Access tables and queries without Access

      Access KB Articles

    V1.3.1 of the Access Knowledge Base Browser was released on 31 January.The articles database now references 2,400 articles.
    The "Q" from Article URLs is now dropped when locating an article on the Microsoft KB server, and the GUI has been updated for WinXP.

    _Back Issues


     January eLetter 

    Download a Searchable Compendium of Issues 1-25

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

    www.ssw.com.au
    Top

    Top

    Editor: Tony D'Ambra
    CONTENTS:

    What's New:
    Super Slick Switchboard
    New Business Model
    --------------------------
    Office 2003 - XML

    Tips
    CommandBar Trick
    Resize Form Controls
    What's in the .ldb file?

    Downloads
    6 New URLs

    Code Sample
    Hide/Show Combo

    Useful Links
    7 New Links

    Coming soon...
    Copy Protector
    Ezy Data 4

    New Access KB Articles
    KB Browser: New Vn

    Back Issues
    Jan2004 eLetter
    #1-25 in a Zip

    Link Partners
    SSW

    Free Subscription

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


    Have questions or comments?
    Send them to me.

    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.

    Access is a trademark of Microsoft Corporation.

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

    Top