Generate Table with a Random Name

nashken

New member
Local time
Today, 09:18
Joined
Oct 20, 2015
Messages
8
Is there any way to write a query that will generate a table with a random name WITHOUT using VBA.
Using access 97 but soon access 2007.

I know I can do this with VBA but have been tasked with doing it without VBA.

Why: it's a job I get paid and I've had the fight and lost. If I can't do it then I can't do it.
 
define "generate table with random name" and its use by example
 
Please tell us more.
Why? Who will use it (if they can find it)?
I can't picture the usefulness of a file with a random name, but I do come from a background where data management was a priority.
 
Say I want to have a query create a table named based upon the current date and time. So
Parameter @newtable = date()
select into @newtable from tblData
 
Yes,I did something like that many years ago. I had a function that returned some numeric characters based on the current time.
I used to add it to a file name to get a common file name with an included timestamp.

It really wasn't a random file name; it was a way to put a date/time stamp into the file name.
 
Was this in vba? Also not dealing with a file but with a table.
 
It was a function written in vba.
 
Sadly vba is not an option or I would be done. Thanks!
 
Have you tried to write an SQL CREATE query where the table name is a derivative of the date or similar ? You can do that in the query designer in SQL view.
 
I expect I will be proved wrong, but I just do not see how you can create the file without some code.
 
Yes. Using a parameter. But the query fails. It appears you cannot use a parameter as a table name. I was hoping someone new of a method in a macro.
 

Users who are viewing this thread

Back
Top Bottom