Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27348

VS 2010 Proper Syntax for a couple issues

$
0
0
This is a quick one,

I have this code, and when I turn Option Explicit on I get an error.

Me.AddTenantsBindingSource.Filter = "TenantID = " & cboSiteFilter.SelectedValue & ""
Option Explicit on prohibits operands of the type Object for operator '&'

Second one is:
If Me.cboSiteFilter.SelectedValue = Nothing Then
Option Strict On disallows operands of type Object for operator '='. Use the 'Is' operator to test for object identity.

Thanks

LB

Viewing all articles
Browse latest Browse all 27348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>