i am unclear if you are doing this in access or vb2008
generic vb code would be to loop through all controls
if you only want to process labels you can useCode:for each c in me.controls if left(c.name, 1) = "Q" then 'code here to rename from 5 end if next
if typename(c) = "Label" then
typof does not work with all ms office controls, but afaik typename does
to edit the events of each control you could try to export the module, then process it as a text file then import it back
or you can use
Code:for i = 100 to 6 step -1 me.controls("Q" & format(i, "000"). name = "Q" & format(i, "000") next




Reply With Quote