Solved

VB Data Results

Posted on 2008-10-02
5
257 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 250 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 250 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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
Course of the Month6 days, 5 hours left to enroll

627 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