Or?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I say 'or' in VB?

For example I want to say:

If xxxxxx or xxxxxx Then
End If
 
Just like you said.

If [SomeField] = "John" or [SomeField]="Bill" then
 
goplayoutside said:
How do I say 'or' in VB?

For example I want to say:

If xxxxxx or xxxxxx Then
End If


The logical operator in Access is Or ;-)

I guess the underlying reason for your question is burried
in what you have for xxxxxx.

If those a integer type values, VBA will perform the bitwise
Or operation on the values (e.g 4 Or 1 results in 5). If
will then convert any non-zero value the Boolean True value.

OTOH, if the xxxxxx represents conditional expressions, then
just write it out:

If X = 5 Or X = 9 Then
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top