Hi,
I have a bound form which has a number of fields in it's recordset which are NOT bound to any controls on the form. In VBA, I need to get the value of one of these fields in the current record. However the field I need will change each time the procedure is run and is determined by the vba procedure itself.
I thought that each underlying field in a form recordset was also a property of the form itself. Therefore I tried
myform.properties(strMyFieldName).Value
where strMyFieldName is a string variable of the name of the field. However this gives an error 2455 Invalid reference to the property.
Can someone please tell me how to get the value of a field in a form recordset when the field selection is dynamic?
Many thanks for reading and for any help!
I have a bound form which has a number of fields in it's recordset which are NOT bound to any controls on the form. In VBA, I need to get the value of one of these fields in the current record. However the field I need will change each time the procedure is run and is determined by the vba procedure itself.
I thought that each underlying field in a form recordset was also a property of the form itself. Therefore I tried
myform.properties(strMyFieldName).Value
where strMyFieldName is a string variable of the name of the field. However this gives an error 2455 Invalid reference to the property.
Can someone please tell me how to get the value of a field in a form recordset when the field selection is dynamic?
Many thanks for reading and for any help!