Passing a string parameter from Access 2003 Macro's RunCode command to CopyObject command

J

JEFF

Please advise if there is a better list to post this to. I have what I hope
is a very simple question. I have an Access 2003 macro that is using a
RunCode action to call a function procedure in an Module that contains a one
line inputbox command to prompt a user for a name string. Here is what the
function that RunCode calls looks like:

Public Function PromptForNewTableName() As String
PromptForNewTableName = InputBox("Please enter the name for the _
archived data", "Title", "newname")
End Function

I want to next pass that name string to a CopyObject action as the next line
in the same macro. How do I set the "New Name" Action Argument in the
CopyObject action to what the user gives me in the above Function?

Is there a better way to do this very basic task? Any advice or pointers to
documentation would be greatly appreciated. I will be glad to post back
results.

Best regards,
Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top