| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- Option Compare Database
- ' ** Access Toolbox Module **
- ' on 2017-02-28,
- ' @author: Olivier Massot
- ' V 1.0
- ' Operations on access objects: tables, queries, forms, reports, macros, modules
- Public Function table_exists(tname As String) As Boolean
- Dim td As Object
-
- table_exists = False
- For Each td In CurrentDb.TableDefs
- If td.name = tname Then
- table_exists = True
- Exit Function
- End If
- Next td
-
- End Function
- Public Function query_exists(qname As String) As Boolean
- Dim rd As Object
-
- query_exists = False
- For Each rd In CurrentDb.QueryDefs
- If rd.name = nom Then
- query_exists = True
- Exit Function
- End If
- Next rd
- End Function
- Public Function form_exists(fname As String) As Boolean
- Dim frm As Object
-
- form_exists = False
- For Each frm In CurrentProject.AllForms
- If frm.name = fname Then
- form_exists = True
- GoTo fin
- End If
- Next frm
- End Function
- Public Function report_exists(rname As String) As Boolean
- Dim rpt As Object
-
- report_exists = False
- For Each rpt In CurrentProject.AllReports
- If et.name = rname Then
- etatExiste = True
- GoTo fin
- End If
- Next rpt
- End Function
- Public Function form_is_opened(fname As String) As Boolean
- form_is_opened = False
- If Not form_exists(fname) Then Exit Function
- form_is_opened = CurrentProject.AllForms(fname).IsLoaded
-
- End Function
- Public Function report_is_opened(rname As String) As Boolean
- report_is_opened = False
- If Not report_exists(rname) Then Exit Function
- report_is_opened = CurrentProject.AllReports(rname).IsLoaded
-
- End Function
|