Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's wrong?
Message
From
05/02/1999 06:23:38
 
 
To
All
General information
Forum:
Visual Basic
Category:
Other
Title:
What's wrong?
Miscellaneous
Thread ID:
00184259
Message ID:
00184259
Views:
53
There is my code for a Search Button.. Is it somebody tell my why I receive a error message "End If without If" and VB highlight the End Sub line when I push on the button??

I don't really know what is the problem.. Thanks!

The sub SubUpdate need a parameter as recordset to run.

Yannick Lepage

Dim ok

ok = False

If cmdbutSearch.Caption = "&Search" Then
puLoad = True
SubSearch
Else 'Bouton = &Update
If Trim$(cmbRoomName.List(cmbRoomName.ListIndex)) = "NewCornelia Room" Then
SubUpdate formData!dataNewCornelia.Recordset
If Trim$(cmbRoomName.List(cmbRoomName.ListIndex)) = "Catalina Suite" Then
SubUpdate formData!dataCatalina.Recordset
ElseIf Trim$(cmbRoomName.List(cmbRoomName.ListIndex)) = "GreenWay Suite" Then
SubUpdate formData!dataGreenWay.Recordset
ElseIf Trim$(cmbRoomName.List(cmbRoomName.ListIndex)) = "Nautical Room" Then
SubUpdate formData!dataNautical.Recordset
ElseIf Trim$(cmbRoomName.List(cmbRoomName.ListIndex)) = "Quito Baquito Suite" Then
SubUpdate formData!dataQuito.Recordset
Else
MsgBox "Please enter a room name.", vbOKOnly + vbCritical + vbExclamation, "Update Error"
End If
End If
Next
Reply
Map
View

Click here to load this message in the networking platform