Results 1 to 2 of 2

Thread: Database control

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    Perth, WA
    Posts
    35

    Question

    Um I have a slight problem, I figured out how to open a database thru a common dialog control.

    But i cant get it to close the one I had open before.

    The code I use to open the database is:
    Set VehDatabase = DBEngine.Workspaces(0).OpenDatabase(cdlDatabase.FileName)
    Set rsVehicles = VehDatabase.OpenRecordset("PricesList", dbOpenDynaset)
    Data1.DatabaseName = (cdlDatabase.FileName)

    If anyone can help with the code to close the existing database it would help my program heaps

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    close

    thy this:

    close myDatabase.mdb
    set myDatabase = nothing
    close myRecordset
    set myRecordset = nothing

    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

Posting Permissions

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



Click Here to Expand Forum to Full Width