1) Create a Form with a text box (txtTable) where user can type in Table Name he wants to copy
2) Put a command button on the form
3) On Click event of thye Command Button put this code
DoCmd.CopyObject , date, acTable, txtTable
if you have the current date on the form (txtTodayDt), you could take that txtbox and put it in the right format (in my case):
txtCharDt = Format(txtTodayDt, "mmddyy"
You don't need to create another text box to get the current date, like kerrigirrl says. You get the date with the Date() function at the same time as you copy the object.
The only thing you might want to do is Format you current date, in case you don't know the system regional settings
DoCmd.CopyObject , Format(date,"mm/dd/yy", acTable, txtTable
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.