2

Can somebody please tell me what the "!" means in line 5 of the following?

Dim rst As Recordset
Dim db As Database
Set db = CurrentDb
Set rst = db.OpenRecordset("zTableFields", , dbAppendOnly)
rst!TableName = "Brad"

Thanks.

Erik A
  • 30,261
  • 11
  • 41
  • 58
  • 1
    possible duplicate of [Bang Notation and Dot Notation in VBA and MS-Access](http://stackoverflow.com/questions/2923957/bang-notation-and-dot-notation-in-vba-and-ms-access) – pmcoltrane Dec 23 '14 at 16:45

1 Answers1

1

It is the delineator between the table or query name, and the field/column name.

These are identical:

    rst.Fields.Item(TableName).value = "Brad"
    rst.Fields(TableName) = "Brad"
    rst(TableName) = "Brad"
Brian Wren
  • 357
  • 5
  • 15