Custom Events in Classes - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Custom Events in Classes

Description:

... Browning. 1. Loading Data To Excel. By. Tom Browning. 11/10 ... Loading Data To Excel. Introduction. Blah. Blah Blah. Blah Blah Blah. Blah Blah Blah Blah Blah ... – PowerPoint PPT presentation

Number of Views:49
Avg rating:3.0/5.0
Slides: 8
Provided by: TBROW
Category:
Tags: classes | custom | events | excel

less

Transcript and Presenter's Notes

Title: Custom Events in Classes


1
Loading Data To Excel
By Tom Browning
2
Loading Data To Excel
  • Introduction
  • Blah
  • Blah Blah
  • Blah Blah Blah
  • Blah Blah Blah Blah Blah
  • Blah Blah Blah Blah Blah Blah

3
Introduction
  • What is linking?
  • Associating tables in one database to another as
    if they are actually in the database
  • Why use linking?
  • Improve multi-user performance
  • Improve application maintenance
  • Increase amount of data that can be handled

4
Splitting a database into linked databases
  • Use a wizard ToolsDatabase UtilitiesDatabase
    Splitter
  • Follow the instructions
  • Manually splitting a database
  • Make a second (or more) copy
  • Delete the tables in one this will be the
    program database
  • Delete the queries, forms, reports, modules and
    macros in the second this will be the data
    database
  • In the program database use FileGet External
    DataLink Tables to link the table from the
    data database
  • Another strategy splitting the data database
  • data
  • support
  • temporary or local
  • other ?

5
Linking Tables Dynamically
  • Use at startup of an application
  • In case the data has been moved
  • Use within an application to link to different
    data at run time

6
Code Part 1
  • Getting ready
  • Dim db As DAO.Database
  • Dim td As DAO.TableDef
  • Doing it
  • Set db CurrentDb
  • On Error Resume Next
  • db.TableDefs.Delete MyTable
  • On Error GoTo Err_Relink
  • Set td db.CreateTableDef(MyTable)
  • td.Connect DATABASE MyFullPathDatabaseNam
    e
  • td.SourceTableName MyTable
  • db.TableDefs.Append td

7
Code Part 2
  • Getting ready
  • Dim db As DAO.Database
  • Dim td As DAO.TableDef
  • Getting rid of the old table
  • Set db CurrentDb
  • On Error Resume Next
  • Set td db.TableDefs(OldTable)
  • db.TableDefs.Delete OldTable
  • On Error GoTo Err_Relink
  • Link the new table
  • Set td db.CreateTableDef(NewTable)
  • td.Connect DATABASE MyFullPathDatabaseNam
    e
  • td.SourceTableName NewTable
  • td.Name NewAliasTable
    !!!!!!!!!!!!!!!!!!!!!!!!!!!
  • db.TableDefs.Append td
  • td.RefreshLink
Write a Comment
User Comments (0)
About PowerShow.com