vba - Access label controls have different properties listed - how can I resolve this? -


i have problem believe related this problem. have many label controls. of them become "weird" , start exhibiting weird "extra bold" display:

enter image description here

these labels have same formatting have different visual representations.

after looking properties both labels, noticed quite strange: have different properties. broken label properties section not showing hyperlink properties nor on-event actions.

enter image description here

in fact, "events" properties sheet empty when go view it. enter image description here

i quite confused going on here. way fix these controls, preferably using vba can add programmatic fix update broken labels.

much surprise, following code works:

application.forms(gmananger_formname).controls("label13").hyperlinkaddress="" 

i expecting sort of error since labels not show control.

i have tried compact/repair no avail. nor did turning cleartype off in access options, suggested in link above.


i have written following code copy/add new control breaks when controls in tab spaces (it inserts new line doesn't delete row, perhaps fix if spend more time, i'm concerned accidentally deleting ton of form controls should this).

sub testcopyingcontrol()     dim c     dim integer, key     dim prop scripting.dictionary     set prop = new scripting.dictionary      set c = application.forms(gmananger_formname).controls("label3120")       = 0 c.properties.count - 1         prop.add c.properties(i).name, c.properties(i).value     next      dim newc label     set newc = createcontrol(gmananger_formname, aclabel)      deletecontrol gmananger_formname, c.name      'there fair number of readonly properties unfortunately...     on error resume next     each key in prop.keys         debug.print key & vbtab & prop(key)         newc.properties(key) = prop(key)     next key   end sub 

i can fix individually cutting/pasting , moving label grid location. lot of work have quite few controls doing this.

  • how can first fix single label control exhibiting behavior?
  • how can programatically via vba?


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -