Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using buttons to run queries 1

Status
Not open for further replies.

vincej

Technical User
Nov 13, 2002
7
US
I am trying to run a query from a button created within "Forms." I cannot transfer the button from forms to my web page within Access for some reason. I tried creating a button within the web page and am unable to apply a query function to the button. Any idea how I can do this?
 
Normally, queries are used as the recordsource for other objects, typically forms and reports.
You should be able to open a query from within Access by using the
DoCmd.OpenQuery "Queryname"

Access command, which will show you the results of running the query if it is a select, or execute it if it is an action query (insert, update, delete).
As for showing the query results within a web page, my way of doing it would be to open a recordset with the SQL and loop through the records, printing the results up on the page as needed and then closing the recordset at the end.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top