0

I have a basic table in access with several populated fields. I would like to explore if there is a way, preferably through the GUI (or maybe through SQL), to add a field containing the name of the table itself. I see only the following data formats for fields: Short text, Long text, number, Date/time, Currency, Autonumber, Yes/No, OLE Object, Hyperlink, Attachment and Calculated. There is nothing pertaining to data object parameters themselves such as table, field or query names or parameters...

1
  • 1
    It is not clear what you want. Please explain a little more. Commented May 14, 2016 at 21:04

1 Answer 1

1

You can access the meta data of the database via VBA (Visual Basic for Applications) macros.

For example, this can show all table names:

Option Compare Database

Public Sub Test()
    Dim database As DAO.database
    Dim tableDef As DAO.tableDef
    Set database = CurrentDb
    For Each tableDef In database.TableDefs
            MsgBox tableDef.Name
    Next
End Sub
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.