bill201
asked on
how can i in access vba copy a query structure in the same database
hi
how can i in vba access copy a structure from query to another table in the same database
for example i want to make a table the the name will be table1 and it's will be emtry but the structure will be like the in the query "Query1"
how can i in vba access copy a structure from query to another table in the same database
for example i want to make a table the the name will be table1 and it's will be emtry but the structure will be like the in the query "Query1"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Put this code in a regular VBA module
Public Function mMakeTable()
With CurrentDb
.Execute "SELECT Query1.* INTO Table1 FROM Query1" 'Make the table
.Execute "DELETE Table1.* FROM Table1" 'delete records
End With
End Function
Then you can call mMakeTable() from the vba Immediate Window if you like.
mx
HTH,
Kent