Results 1 to 4 of 4

Thread: Functions

  1. #1
    Join Date
    Mar 2004
    Posts
    128

    Unanswered: Functions

    Hi all,
    I want to ask two questions:
    1. Is ther any procedure the check if atable as already exsist,I want to make importing to a certain table if it doesn't exsist yet in the database.
    2.I want to execute a function when I exsit from Access.I know that I can call the function when I close the main form of the program,but the problem that maybe some on closed the application from the X (Close) of the application window and not from the form exit button.
    I want a sure way to call this function with all exit ways from the application.
    Best regards...

  2. #2
    Join Date
    Apr 2004
    Posts
    4

    Help with table part

    What you need to do is use code to check to see if the table exists

    Dim db as dao.database
    dim tdf as dao.tabledef

    set db = dbengine(0)(0)

    db.tabledefs.refresh

    for each tdf in db.tabledefs
    If tdf.name = <<table name>> then
    'Import your table here
    End if
    next tdf

  3. #3
    Join Date
    Mar 2004
    Posts
    128

    exit

    Hi,
    What about the exit. I want to be sure that certain function has executed before exiting access
    Please help.
    thanks...

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Call your function from your Form_Unload(Cancel As Integer) event

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •