Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[blue]Public Sub GetAllForms()
Dim db As DAO.Database, rst As DAO.Recordset, SQL As String
Set db = CurrentDb
SQL = "SELECT Name, Type " & _
"From MSysObjects " & _
"WHERE ([Type] = -32768) " & _
"ORDER BY [Name];"
Set rst = db.OpenRecordset(SQL, dbOpenDynaset)
If rst.BOF Then
MsgBox "No Forms in Database!"
Else
Do
Debug.Print rst!Name
rst.MoveNext
Loop Until rst.EOF
End If
Set rst = Nothing
Set db = Nothing
End Sub[/blue]
Sub BuildFormsTable()
Dim tdf As Object
Dim fld, fn, tn, strSQL
'Create table
strSQL = "Create Table tblForms (TableName Text (100),FieldName Text(100))"
'Clear existing table
'strSQL = "Delete From tblForms"
CurrentDb.Execute strSQL
For Each frm In CurrentProject.AllForms
DoCmd.OpenForm frm.Name, acDesign
Set f = Forms(frm.Name)
fn = f.Name
For Each ctl In f.Controls
cn = ctl.Name
strSQL = "INSERT INTO tblForms ( " _
& "FormName,ControlName) VALUES ('" _
& fn & "','" & cn & "')"
CurrentDb.Execute strSQL
Next
DoCmd.Close acForm, fn
Next
End Sub
Sub BuildFormsTable()
Dim tdf As Object
Dim fld, fn, tn, strSQL
'Create table
strSQL = "Create Table tblForms (FormName Text(100),ControlName Text(100))"
'Clear existing table
'strSQL = "Delete From tblForms"
CurrentDb.Execute strSQL
For Each frm In CurrentProject.AllForms
DoCmd.OpenForm frm.Name, acDesign
Set f = Forms(frm.Name)
fn = f.Name
For Each ctl In f.Controls
cn = ctl.Name
strSQL = "INSERT INTO tblForms ( " _
& "FormName,ControlName) VALUES ('" _
& fn & "','" & cn & "')"
CurrentDb.Execute strSQL
Next
DoCmd.Close acForm, fn
Next
End Sub