Wrox Programmer Forums
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 6th, 2007, 05:46 PM
Registered User
 
Join Date: Feb 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

For those who want to know if I was finally successful. I tried Gonzalo's suggestion about importing SQL into a query. Acess came back with an error "something Too complex". I butted heads with this before.
I defined couple of variables. Set the variables to the form controls. Put the variables into the SQL.
SUCCESS.

     strSql = "SELECT EQUIP.BLDG_NO, EQUIP.EQUIP_NO, EQUIP.EQCODE, EQUIP.LOCAT, EQUIP.SERVES" & _
                " FROM EQUIP WHERE EQUIP.BLDG_NO = " & intBldg & _
                " And EQUIP.EQUIP_NO = '" & strEquip & "'" & _
                " ORDER BY EQUIP.BLDG_NO"

My 15+ years experience has been with Rdb and SQL. Much less confusion with syntax. That worlds seems much simpler than Microsoft VBA.
Thanks for all the tips.
 
Old March 7th, 2007, 09:09 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

glad you make it work.. anyway Brian wrote a wonderful explanation about your problem ;)

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report & VB6 & SQL Server wlho VB How-To 2 June 5th, 2013 01:58 AM
Need Help with SQL syntax DeannaF829 VB Databases Basics 2 April 30th, 2007 12:12 PM
SQL-syntax grstad SQL Language 9 January 30th, 2007 02:40 PM
sql & join tables & find a field in multiple table trangd Beginning PHP 2 January 29th, 2004 07:18 PM
SQL Syntax jeffg22 SQL Language 6 July 28th, 2003 06:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.