Comparing textbox and combobox properties to documentation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We are in the process of documenting our database. The tables will be in
SQL and the data entry will be done in Access with a client / server
relationship. We are creating another database that will store definitions
and also attributes about the fields, textbox and combobox. Stuff like input
mask, status bar text, control tip text, etc.

One of the features in the database is to be able to turn the control tip
text and status bar text on / off. There are two functions, one with the
objectname.controltiptext = "" for all objects and one with the
objectname.controltiptext = "Description" I want the description to
reference the control tip text field in the documentation database. I also
want to run periodic checks to make sure the input mask in the form matches
the input mask stored in the documentation database, etc. Obviously the
object names and references will match up, that's a given.

My objective is to make sure the documentation reflects the attributes in
the database. I have looked at some of the documenters for SQL server you
can purchase such as
http://www.ag-software.com/ags_scribe_index.asp
http://www.avdf.com/aug98/art_vb006.html
But they don't seem to do what I them to do.

1) Is what I am trying to do possible?
2) If yes how do I do it?

Can
 
Firstly, there is a built-in documenter that can create a listing of the
properties of your objects:
Tools | Analyze | Documenter

Programmatically, you can use DAO to examine the properties of objects, as
in the example below.

------------------code starts-------------------------
Function ShowFormProperties(strFormName As String)
On Error GoTo Err_Handler
Dim frm As Form
Dim ctl As Control
Dim prp As Property
Dim strOut As String

DoCmd.OpenForm strFormName, acDesign, windowmode:=acHidden
Set frm = Forms(strFormName)

' For Each prp In frm.Properties
' strOut = strFormName & "." & prp.Name & ": "
' strOut = strOut & prp.Type & vbTab
' strOut = strOut & prp.Value
' Debug.Print strOut
' Next
For Each ctl In frm
For Each prp In ctl.Properties
strOut = strFormName & "." & ctl.Name & "." & prp.Name & ": "
strOut = strOut & prp.Type & vbTab
strOut = strOut & prp.Value
Debug.Print strOut
Next
If ctl.ControlType = acTextBox Then Stop
Next

Set frm = Nothing
DoCmd.Close acForm, strFormName, acSaveNo

Exit_Handler:
Exit Function

Err_Handler:
Select Case Err.Number
Case 2186:
strOut = strOut & Err.Description
Resume Next
Case Else
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbExclamation, "ShowFormProperties()"
Resume Exit_Handler
End Select
End Function
------------------code ends-------------------------
 
Thanks for the info. I forgot to mention that I already knew about the
built-in documenter and (a) I did not really find it that useful / helpful
.... the formatting and options were pretty bad although it has been a while
since I used it (b) it does not give me the flexibility I want. Eventually
this documentation will probably be a web-based application that people can
search on.
 
Back
Top