Mavver
01-17-2008, 07:49 AM
I am a self taught novice at coding and stuff, can someone please have a look at the following a see if you can see where I am going wrong.
An error box keeps popping up saying I have got the wrong syntax]
Thanks in advance
Mav
If Me!lstEOIType.ItemsSelected.Count > 0 Then
For Each varEOIType In Me!lstEOIType.ItemsSelected
strEOIType = strEOIType & " Or (qryEOIBase.type) Like '*" & Me!lstEOIType.ItemData(varEOIType) & "*'"
Next varEOIType
strEOIType = Right(strEOIType, Len(strEOIType) - 28)
strEOIType = " ((qryEOIBase.type) LIKE " & strEOIType & ")"
Else
LEOIType = MsgBox("You have not selected an Enquiry Type, do you wish to continue", vbYesNo, "Continue")
If LEOIType = vbYes Then
strEOIType = " qryEOIBase.type Like '*'"
Else
Exit Sub
End If
End If
An error box keeps popping up saying I have got the wrong syntax]
Thanks in advance
Mav
If Me!lstEOIType.ItemsSelected.Count > 0 Then
For Each varEOIType In Me!lstEOIType.ItemsSelected
strEOIType = strEOIType & " Or (qryEOIBase.type) Like '*" & Me!lstEOIType.ItemData(varEOIType) & "*'"
Next varEOIType
strEOIType = Right(strEOIType, Len(strEOIType) - 28)
strEOIType = " ((qryEOIBase.type) LIKE " & strEOIType & ")"
Else
LEOIType = MsgBox("You have not selected an Enquiry Type, do you wish to continue", vbYesNo, "Continue")
If LEOIType = vbYes Then
strEOIType = " qryEOIBase.type Like '*'"
Else
Exit Sub
End If
End If