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.
Sub UpdateControls()
Dim frm As Form
Dim ctl As Control
Dim rs As DAO.Recordset
Dim db As DAO.Database
Set db = CurrentDb
DoCmd.OpenForm "Table1", acDesign
Set frm = Forms!Table1
Set rs = db.OpenRecordset(frm.RecordSource)
For Each ctl In frm.Controls
If ctl.ControlType = acTextBox _
Or ctl.ControlType = acComboBox _
Or ctl.ControlType = acListBox Then
On Error Resume Next
ctl.StatusBarText = rs(ctl.ControlSource).Properties("Description")
End If
Next
End Sub
[blue]Public Sub UpdateDescription(frmName As String, tblName As String)
Dim db As DAO.Database, tdf As DAO.TableDef, frm As Form, fld As Field
DoCmd.OpenForm frmName, acDesign
Set db = CurrentDb
Set tdf = db.TableDefs(tblName)
Set frm = Forms(frmName)
frm.Visible = False
For Each fld In tdf.Fields
frm(fld.Name).StatusBarText = fld.Properties("Description")
Next
DoCmd.Close acForm, frmName, acSaveYes
Set frm = Nothing
Set tdf = Nothing
End Sub[/blue]