Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Access Query
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Access Query

 Post Reply Post Reply
Author
phorne View Drop Down
Newbie
Newbie


Joined: 18 May 2003
Location: United States
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote phorne Quote  Post ReplyReply Direct Link To This Post Topic: Access Query
    Posted: 07 June 2003 at 6:36pm

I have a Access database that has one table with a field called division.  The database is full of race car drivers in several divisions. I have access queries that selects drivers and their race results by division. I need to select records by using the queries I have in Access.... can this be done??

Statement I am using to select all records:

strSQL = "SELECT thursdaythunder.* FROM thursdaythunder order by car;"

The database is named thunder, the table is named thursdaythunder and some of the queries are named: bandits, masters, pro... etc

Back to Top
TYSON View Drop Down
Groupie
Groupie


Joined: 18 August 2002
Location: Australia
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote TYSON Quote  Post ReplyReply Direct Link To This Post Posted: 07 June 2003 at 7:28pm

Try this

strSQL = "EXECUTE bandits;"

And if you have query's that require parameters, you could just do so like this.

strSQL = "EXECUTE bandits Param1, Param2;"

Where param 1 and 2 are the values you want to pass into the query.

Hope this helps

Back to Top
phorne View Drop Down
Newbie
Newbie


Joined: 18 May 2003
Location: United States
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote phorne Quote  Post ReplyReply Direct Link To This Post Posted: 07 June 2003 at 8:01pm

Thanks - one good answer leads to another dumb question!

I am new to this - have never used the Execute statement..

It worked...

I also finally got it to work with the following:

strSQL = "SELECT * FROM Masters order by [6/5/03];"

I tried to order the Execute command but it did not work..

strSQL = "EXECUTE masters order by [6/5/03];"

Is it better to use the execute statement...

Also I would like to have a dropdown box with the divisions in it that would then pass the desired statement to the execute statement or the one I got to work.

Can that be done??

Back to Top
TYSON View Drop Down
Groupie
Groupie


Joined: 18 August 2002
Location: Australia
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote TYSON Quote  Post ReplyReply Direct Link To This Post Posted: 07 June 2003 at 9:46pm
You can change the Ordering of the statement by modifying the query in access
Back to Top
TYSON View Drop Down
Groupie
Groupie


Joined: 18 August 2002
Location: Australia
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote TYSON Quote  Post ReplyReply Direct Link To This Post Posted: 07 June 2003 at 9:51pm

You also dont have to use the execute command to fire the query, here's a article that may explain it a little better.

http://www.xefteri.com/articles/apr302002/default.aspx

Back to Top
farrukh View Drop Down
Groupie
Groupie
Avatar

Joined: 10 May 2002
Location: Pakistan
Status: Offline
Points: 147
Post Options Post Options   Thanks (0) Thanks(0)   Quote farrukh Quote  Post ReplyReply Direct Link To This Post Posted: 08 June 2003 at 12:07am

Originally posted by phorne phorne wrote:


strSQL = "SELECT * FROM Masters order by [6/5/03];"
-------------------------------------------^^^^^
Is these is the field name in the database.........

i have collected some nice avatars (37) and smileys (227) here you can download
http://www24.brinkster.com/webmastertool/download.html
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.