I know of two ways to specify a field in a record set with VBA:
FooTable!BarField = 1
FooTable("Bar Field") = 2
But what happens in a With block?
With FooTable
!BarField = 1
("Bar Field") = 2
End With
Is it possible to do both, or is there a workaround?
The following are all equivalent:
With FooTable
.Fields("Bar Field").Value = 2 '.Value is default property of a Field object'
.Fields("Bar Field") = 2
![Bar Field] = 2
End With