Roly Reefer
Registered User.
- Local time
- Today, 17:00
- Joined
- Jan 28, 2005
- Messages
- 37
I am teaching myself Access VBA and have got a problem with setting up a new collection, which I can't resolve in help or google.
I have been shown this code for setting up a collection, which is basically to set txtcustomers on form 0 (frmcustomers) as item 5. I didn't get the first line of code and tried it in a Public sub first, but I keep getting an error saying Compile Error: Invalid use of property.
Public Property Set Collecion(p As Control)
Forms(0).Controls (5)
Forms("frmCustomers").Controls ("txtCustomerID")
[Forms!frmCustomers!txtCustomerID]
End Property
Please can someone give me the missing bits of code.
Thanks very much.
I have been shown this code for setting up a collection, which is basically to set txtcustomers on form 0 (frmcustomers) as item 5. I didn't get the first line of code and tried it in a Public sub first, but I keep getting an error saying Compile Error: Invalid use of property.
Public Property Set Collecion(p As Control)
Forms(0).Controls (5)
Forms("frmCustomers").Controls ("txtCustomerID")
[Forms!frmCustomers!txtCustomerID]
End Property
Please can someone give me the missing bits of code.
Thanks very much.