controltype keeps giving method or data member not found

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hope someone can give me the easy answer

Following code keeps giving me the "Method or Data Member not Found"

Private Sub cmdClear_Click()
Dim ctl As Controls

For Each ctl In Me.Controls

If ctl.ControlType = acComboBox Then
ctl = Null
ElseIf ctl.ControlType = acTextBox Then
ctl = Null
Else
End If

Next

End Sub

Am I missing a reference or something.

Thanks
Chris
 
And set CTL = Nothing, not null


Chris

-----Original Message-----
Drop the "s" in Controls in your Dim statement.


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com





.
 
Thanks. Taking the s off fixed the error message and will change the null to
nothing.
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top