Access SQL to Visual Basic SQL Help

Access SQL to Visual Basic SQL Help

Post by Tomm » Thu, 14 Jan 1999 04:00:00

I have this Query,

SELECT DISTINCTROW Bondee.LastName, Bondee.FirstName, Residence.BadAddress,
Residence.BadPhone, Bondee.Active
FROM Bondee INNER JOIN Residence ON Bondee.CIDNumber = Residence.CIDNumber
WHERE (((Residence.BadAddress)=True) AND ((Bondee.Active)=True)) OR
(([Residence].[badphone]=True) AND ((Bondee.Active)=True))
ORDER BY Bondee.LastName, Bondee.FirstName;

I designed it in Access.  I would like very much assign it to

and then use it as
Set Mytable = MyDB.OpenRecordset(SQL$, dbOpenDynaset)

mytable sould be the name of the recordset
mytable!LastName and mytable!FirstName works but
!BadAddress, !BadPhone, and !Active registers a null with no errors.
They all 3 have data.

What am I doing wrong?   Can you give me the exact syntax or any help in
finding out how to do this....
Thanks for the help....



******** VISIT US AT ***********
Company    : Hall Kinion/RTP
Website    :
Location   : WILMINGTON, NC
Job Type   : Full-Time Salaried
HALL KINION/ Technical Recruiter-NEVER A FEE!

Hall Kinion is the largest full-service tech recruiting firm in the Silcon
Valleys of the world. We work with top technical companies to offer the best of
permanent and contract placements in North Carolina and across the United
States and the U.K.

2-5 years Visual Basic and RDBMS (Oracle, Sybase, Access or SQL Server).

Plusses: web technology experience, Java, Visual C++.

Multiple positions in Raleigh, NC or Wilmington, NC. Pay is excellent; good
learning opportunities too! Permanent, full-time opportunity!

Travel Required          :None
Educational Requirements :None
Required Skills
* Visual Basic
* MS SQL Server
Definite Pluses
* Java
* Visual C++
* Web Browser Technology
Why use me to find you the best job possible? IT SPECIALIST THAT WORKS WITH
OVER 1500 Companies Nationwide, (150 Locally) = THE BEST JOBS
Contact Information:
Reference : SJ113234
Debbie Bush

Phone: 800-365-3031
Fax No: 919-572-6550
***********************  ****************************

                The On-Line, On-Target Job Finder for Computer Professionals  

** Post Your Resume and see results immediately!! ** Always free **
** Post jobs for 30 days for $100, up to 250 postings $350/month
** Matching Resumes E-mailed daily
**  Your ads are virtually guaranteed to be seen by jobseekers on the NET **

                    ** Automatic Posting to **
   ** Yahoo            ** Americas Job Bank    ** Career City    *** ClassifiedsWarehouse
   ** HeadHunter.Net   ** Classifieds 2000     ** Usenet Newsgroups
               *** OVER 40 MILLION HITS/MONTH COMBINED !!! ***

***********************  ****************************

2. OWC10 PivottableObject causes IE to reload!

3. Migrating from Visual Basic 3 SQL 4.0 to Visual Basic 5.0 and/or SQL Anywhere

4. changing sort order from binary to dictionary case-insensitive

5. GA-Atlanta-98153--Visual Basic-MS ACCESS-RDBMS-ORACLE-Programmer-Visual Basic and Access

6. Opening *.mdx & *.idx files with Visual Basic 4.0

7. symmetric replication update example

8. Accessing SQL Server transaction Log with Visual C++ or Visual Basic