clear button works on Form but not subform ?

f_disk

Registered User.
Local time
Yesterday, 20:58
Joined
Jul 18, 2006
Messages
45
I have a clear button that works on a number of items on my form...
The List box and text fields...

How do I get it to also clear items from a subform that is made up of
information input from main form...The information in the subform is
found through a query.

I redid a db that was posted here some time ago by Grommit ...

Private Sub btnClear_Click()
Dim intIndex As Integer

' Clear all search items
Me.txtFirstName = ""
Me.txtLastName = ""

' De-select each item in Color List (multiselect list)
For intIndex = 0 To Me.lstFavColor.ListCount - 1
Me.lstFavColor.Selected(intIndex) = False
Next

End Sub

I used four columns in the subform and I need to clear only one...
Lets call it LastName...per the example below to make things easier.

The sample db can be found here and it is and excellent one !
http://www.access-programmers.co.uk/forums/showthread.php?t=99353&highlight=search+button
 

Users who are viewing this thread

Back
Top Bottom