Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB Data Results

Posted on 2008-10-02
5
Medium Priority
?
260 Views
Last Modified: 2013-12-25
CMDString = "select DisplayName from vwSSO where SiteLocation = '" & HSite.Value Or Hall.Value & "'"

When I run my app. the fields are empty. Should I be closing my statement any different?
0
Comment
Question by:devweez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
JMT116 earned 1000 total points
ID: 22626799
I think your cmd string should look like
CMDString = "select DisplayName from vwSSO where SiteLocation = '" & HSite.Value & "'  Or SiteLocation = '" & Hall.Value & "'"
0
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 1000 total points
ID: 22626828
or it can be:

CMDString = "select DisplayName from vwSSO where SiteLocation in ('" & HSite.Value & "', '" & Hall.Value & "')"
0
 
LVL 3

Expert Comment

by:JMT116
ID: 22629310
You use of in would achieve the same thing as using multiple or statements, but has the advantage of being more concise.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question