Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

make table queries

Forum home » Delegate support and help forum » Microsoft Access Training and help » Make table queries

Make table queries

ResolvedVersion 2003

Rachel has attended:
Access Introduction course
Access Intermediate course
Access Advanced course

Make table queries

If I made a make table query and a form to run that query, and I wanted to run that query several times a year but I didnt want to re-write existing tables, how would I do that?

Edited on Tue 12 Aug 2008, 13:34

RE: Make table queries

Thank you for your question

After some consideration it seems the only way to do this would be to write some VBA code that would prompt the user to enter a table name and would then insert that name into the queries SQL and then run the query.

An example of the code required is as follows

Sub MakeTable()

Dim strTable As String
Dim strSQL As String


strTable = InputBox("Enter table name")

strSQL = "SELECT Employees.Company, Employees.[Last Name], Employees.[First Name] INTO" & """strtable""" & "FROM Employees;"


DoCmd.Run strSQL

End Sub


However I suggest that you might find things easier if you use an append query to send all the data to the same table. You can then run searches on that table using date ranges

Regards

Stephen

Access tip:

Creating Parameter wildcard queries

To creat a parameter query that also uses a wildcard, in the query design type in like []+*.

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.