Re: Rename Tables with Parameter Prompt

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You can write VBA code that uses the InputBox function to prompt for the
suffix, and then rename the table.

Using DAO, it would be something like:

Dim strSuffix As String
Dim strTableName As String

strTableName = "MyTable"
strSuffix = InputBox("What Suffix?", "Rename Table", "")
If Len(strSuffix) > 0 Then
CurrentDb().TableDefs(strTableName).Name = _
strTableName & "_" & strSuffix
End If

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Kevin" <Kevin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8100ECD1-0618-4AA4-B612-9A41C5B0CB05@xxxxxxxxxxxxxxxx
>I tried this question in the macro section with a "not possible" answer so
>I
> thought to try here. I would like to rename mulitple tables in one step by
> appending a suffix to the end of the existing table names. However, I
> would
> like a parameter prompt to specify what to append to the names. Is this
> possible? Thank You for any effort.
>
> --
> Kevin


.



Relevant Pages

  • Re: Renaming parts in an assembly?
    ... The other downside is it'll loose any 'in context' relations. ... I need to rename all of these parts. ... the children with the same "V2" suffix. ... for me to put my own suffix is indeed already in the SWks Explorer ...
    (comp.cad.solidworks)
  • Re: KB9554430
    ... Just rename msxml4.dll at the Elevated Command Prompt, Larry. ... "Elevated Command Prompt " and found a page explaining it a little better. ...
    (microsoft.public.windows.vista.security)
  • Re: How to error-proof Doug Steels "FixConnections"?
    ... Rename them by appending some suffix that ... delete the tables with the "_TBD" suffix. ... My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis ...
    (microsoft.public.access.externaldata)
  • Re: large file issue in Windows Server 2003
    ... The error happens with rename from either Win Explorer or the cmd prompt. ... I made a 2 gig file on a compressed volume on a completely seperate Win2003 ...
    (microsoft.public.windows.server.general)
  • Re: Forgot administrator password
    ... Rename the file logon.scr to "logonOLD.src" ... the prompt to logon is appear and wait for screensaver... ... Change the administrator password, by "net user" command. ... > workgroup.Now How can I login to the system. ...
    (microsoft.public.win2000.security)