Re: Rename Tables with Parameter Prompt
- From: "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx>
- Date: Sun, 25 Sep 2005 10:39:03 -0400
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
.
- Prev by Date: Crosstab Query SQL
- Next by Date: Re: Field highlight on a Continous Form
- Previous by thread: Crosstab Query SQL
- Next by thread: Re: Rename Tables with Parameter Prompt
- Index(es):
Relevant Pages
|