strange fenomen in Access 2007 with label.Caption change in VBA

Discussion in 'Visual Basic .Net' started by DN Admin, Apr 26, 2012.

  1. DN Admin

    Staff Member

    Country:
    United States
    Joined:
    Aug 7, 2010
    Location:
    Joliet, IL U.S.A.
    I've made a Access application that's made only with forms, tables and VBA in Access 2010. No macro's...
    I've exported it to a 2003 version and runs fine on a computer with Access 2003 by changing some references.
    On a computer with 2007 it starts up and do the most thinks accept one form.
    That form contains many labels en textboxes that change after updating a combobox. And also when the form opens.
    When the form opens, it just change one label by rapportdatum.Caption = " test ".
    That line causes a problem and Acces (or Windows7) trows an error and close Access.
    I removed the label and made it back, gived an other name, and so on and so on. Nothing solves the problem.

    When I make that line to a comment line the problem is solved. Even tests by changing another label before or after that comment line workes fine an the application is till doing the job. That's how I isolated the line
    that makes Access stops.
    Removing the ' at the beginning of that line and Access makes an error and closses when that form opens.
    The only way that solve the problem is to change that label by not to call it direct by Me.rapportdatum.Caption or shorter rapportdatum.Caption but indirect by Controls("rapportdatum").Caption = " test ".
    Who can tell me why I can't change that specific label use the direct call methode and other labels in the same form workes well?


    View the full article
     
    #1

Share This Page