moke123
AWF VIP
- Local time
- Today, 04:21
- Joined
- Jan 11, 2013
- Messages
- 4,771
You should add option explicit to all your declarations.
try using .execute method rather than docmd.runsql. Its faster and doesn't require turning warnings on and off.
rather than using a prefix like
try using the controls tag property like
by using instr() you can use the tag for more than one procedure.
should be
The way you have it TaskNo, Hold_TaskNo, sql1 and sql2 are variants.
try using .execute method rather than docmd.runsql. Its faster and doesn't require turning warnings on and off.
rather than using a prefix like
Code:
For Each cControl In Me.Controls
If cControl.Name Like "m_*" Then cControl.Visible = True
If cControl.Name Like "frame*" Then cControl.Visible = True
Next
Code:
For Each cControl In Me.Controls
If InStr(1, cControl.Tag, "XYZ") Then
cControl.Visible = True
End If
Next
Code:
Dim sql1, sql2, sqlMax As String
Dim TaskNo, Hold_TaskNo, i As Integer
Code:
Dim sql1 As String , sql2 As String, sqlMax As String
Dim TaskNo As Integer , Hold_TaskNo As Integer, i As Integer