| 2:41 pm on Jan 24, 2011 (gmt 0)|
Normally you would create a link from another page with the myID in the url for the user to click on. Once they click on that link the url will have the querystring myID for you to use.
| 3:50 pm on Jan 24, 2011 (gmt 0)|
Sorry I think you miss-understand. I mean, in the MS access database I want to write a query that I can put on my page. So for instance a simple query will look like this: Select * From Mytable;
What I need to do is write an access query so it calls the id from the URL but from within the database if you understand?
| 6:04 pm on Jan 24, 2011 (gmt 0)|
access cannot (AFAIK) get variable values from your web page directly.
you need to use vbscript on your asp page in order to 'connect' to access and send the variables you need.
| 6:08 pm on Jan 24, 2011 (gmt 0)|
ok so it would be like sql = "myQuery" & (request.querystring("ID")) & ""?
So how would the SQL in my access query go? Would it be something like: "SELECT * FROM MYTABLE WHERE ID = ID;" ?
| 4:55 am on Jan 25, 2011 (gmt 0)|
It's been ages since I used a prepared query in Access, but try putting  around the variable:
SELECT * FROM MYTABLE WHERE ID = [ID]
Then you use a Command object, set the commandtext to be "myQuery" and use the Parameters.Add() method to define your parameter appropriately.
| 4:11 pm on Jan 25, 2011 (gmt 0)|
Thanks bmcgee! I will try that.