简体   繁体   中英

What does “!” mean in VBA

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.

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM