Consulting

Results 1 to 3 of 3

Thread: VBA Wildcard

  1. #1
    VBAX Newbie
    Joined
    Jul 2014
    Posts
    2
    Location

    VBA Wildcard

    I have an access table which needs to be renamed and uploaded to an access db every month. See below. I am able to rename the table but the last part (month) of the table changes every month. I there a way to rename this table using a wildcard? "Seizure lines thru *"

    Public Function Renametable() As Object
        Dim dbs As Database
        Set dbs = DBEngine.OpenDatabase("c:\seizures\nancy\nancy.mdb")
        Dim tdf As TableDef
        Set tdf = dbs.TableDefs("Seizure lines thru june")
        tdf.Name = "FY09 SASCOM"
        dbs.Close
    End Function
    Thanks..
    Last edited by Aussiebear; 04-01-2025 at 10:28 PM.

  2. #2
    VBAX Tutor
    Joined
    Mar 2014
    Posts
    208
    Location
    You should NEVER rename a table. None of the programs/queries will work.
    Copy an existing permenant name to your new name table.

  3. #3
    VBAX Newbie
    Joined
    Jul 2014
    Posts
    2
    Location

    Wildcard

    Quote Originally Posted by ranman256 View Post
    You should NEVER rename a table. None of the programs/queries will work.
    Copy an existing permenant name to your new name table.
    How would I copy it to a new table when the table name (month) changes every month? I know I can manually do it but I am trying to get away from that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •