smtazulislam
Member
- Local time
- Today, 22:09
- Joined
- Mar 27, 2020
- Messages
- 808
I forgot to wrote "Sub".If there are any comments between the header and End line, Access won't delete them automatically.
If the procedures contains nothing but comments either delete it completely or also comment out the First and last lines.
BTW the first line should be Private Sub cmdDelete_Click. As written, your code won't compile so an ACCDE won't ever be created.
Have you added Option Explicit as the second line in each code module and then compiled your project correcting all errors?
I have "Option Explicit".But my question is if I block all code and I try to debug > Compile then dont have any error. It have any problem to create .accde file.
or I should delete code block range
Thank you.
Code:
Option Compare Database
Option Explicit
Private Sub chkCurrentYear_AfterUpdate()
'If (chkCurrentYear.Value) = 0 Then
' Me.cboYears.Enabled = True
'Else
' Me.cboYears.Enabled = False
'End If
End Sub