RemoveItem

AuroX7

Registered User.
Local time
Yesterday, 23:10
Joined
Feb 22, 2006
Messages
44
The AddItem seems to work fine, but RemoveItem doesn't, yet I've used precisely the same syntax except for 'RemoveItem'

MsgBox "Booking cancelled!", vbInformation, "Booking Cancellation"

If Month(Me.Date_1) = 1 Then
ListJ.RemoveItem Me.BoI
ElseIf Month(Me.Date_1) = 2 Then
ListF.RemoveItem Me.BoI
End If

When I click the button to remove item, I get an error saying 'invalid call or procedure'

Thanks in advance. :D

(This is my AddItem code):

MsgBox "Booking successfully added!", vbInformation, "Booking"

If Month(Me.Date_1) = 1 Then
ListJ.AddItem Me.BoI
ElseIf Month(Me.Date_1) = 2 Then
ListF.AddItem Me.BoI
End If
 
I believe that you are missing the following line after your remove item line...

RemoveListItem = True

Searching the forum is a great way to discover and learn the answers to your Access programming questions.

I quickly found this by searching MSDN...
RemoveItem Method

HTH
 

Users who are viewing this thread

Back
Top Bottom