I'm looking through an access database for work currently and came across some confusing code.
Private Sub Form_Current()
Me.Parent!PF = Me.[Compound Number]
Me.Parent.start = Me.[Study Start]
'over and over for different variables
end sub
I'm wondering what the brackets are for in vba (outside of arrays)and why someone would need this code. Thanks
Without the brackets you would have :
Me.Compound Number
Which would be a call to a routine called Compound
with an argument called Number
.
The square brackets escape the object name that contains a space (or other reserved characters, symbols or words).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With