I am trying to apply the caption property to a series of command buttons each based upon a field that I get from a recordset generated from a query. So hypothetically my 30+ command buttons would have names like "EFF-01, EFF-02, EFF-03... etc.. sometimes. Button one would have the caption of EFF-01, button two would have the caption of EFF-02, .... etc. The names would change per results from a query. All buttons would then have captions.
The form that I am trying to make is to simulate a touchscreen except for now with a mouse cursor. I am not able to assign a caption to my buttons. I have made my button names like cmd_Product_1, cmd_Product_2, etc...
In trying to reference my command buttons to assign the captions from my recordset info I made a string variable for cmd_Product_ and an integer variable to append to the end of the name. I believe the variable string name for my command buttons is working OK up until it comes time for me to assign the string to the control. I get a runtime error 91 "object variable not set".
Can someone point me to the solution to this please?