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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create name based on control value for Make Table Query

Status
Not open for further replies.

Drenda

Programmer
Joined
Sep 1, 2007
Messages
85
Location
GB
Can you please help

Is there a way to create a make table that is named dependant on the value of a control on a form. For example I have created a log in form with 4 users and may add more in the future and the name of the make table would be dependant on the user logged in so.....

User A logs in a table called user A is created
User B logs in a table called user B is created

and so on

Many thanks in anticipation of any help!
 
What have you tried so far ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for the response

Unfortunately not much - have been scanning the internet for tips and thought I might get some pointers

 
I have now tried the following
SELECT [Auth Req Name tab test].*
INTO [User Name] (This should be the control name but resulting table is called user name)
FROM [Auth Req Name tab test];


 
In VBA:
DoCmd.RunSQL "SELECT * INTO [" & Me![User Name] & "] FROM [Auth Req Name tab test]"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
This is excellent - one more queston - is there any way I can set a primary key

Many Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top