Solved

VB Data Results

Posted on 2008-10-02
5
249 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
  • 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 69

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now