René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -
 

read_property [Access macro]

option explicit

public sub read_property ()

  dim ac  as access.application
  dim db  as dao.database

' run add_property first.
  dim mdb_name as string
      mdb_name = "c:\temp\prop_test.mdb"

  set ac = new access.application
' set db = ac.dbEngine.workspaces(0).createDatabase(mdb_name, dbLangGeneral, 0)

  ac.openCurrentDatabase(mdb_name)

  set db = ac.currentDB
  
  dim prp as dao.property
  for each prp in db.properties
      if prp.type <> 0 then
         msgBox(prp.name & " = " & prp.Value)
      else
         msgBox(prp.name & " (type = 0)")
      end if
  next

  msgBox("finished")

end sub