I'm trying to display a field on a form depending on the results of an sql query. Since I don't know vba in access I'm struggling and don't know where I am going wrong. Help will be greatly appreciated.
Dim RecordSt As Recordset
Dim dBase As Database
Dim stringSQL As String
Set dBase = CurrentDb()
stringSQL = "SELECT * FROM Table1 WHERE ID = 2"
DoCmd.RunSQL (stringSQL)
If RecordSt.Fields.Count > 0 Then
Me.Other.Visible = True
Else
Me.Other.Visible = False
End If

RecordSt? Do you have anOption Explicitat the beginning of your module ? Couldn't you just use aDCount()here, eliminating the requirement for VBA code ?