Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Arkansas, USA
    Posts
    163
    Thanks
    0
    Thanked 0 Times in 0 Posts

    unable to use controls in Code (a2K)

    I have run into a problem when writing code in VBA.

    First let me explain that when creating my form, I used the drag and drop feature from the field list to insert the controls onto the form.(in case this makes a difference, as I think it might.)

    Normally when I try to write some code for an event such as the AfterUpdate, VB automatically gives me the drop down menus, but when I have tried to write commands such as Settled.visible=True, it will not run the procedure. If I change the control name to something such as textSettled, then the code runs fine. I don't want to have to go back and rename all of the controls. In addition to this problem, when I try to insert labels that correspond to these controls, which are labelled like "label13" etc. VB will not recognize these either. Am I doing somehting wrong or should I not use the drag and drop where the controls are named automatically.

    Please help.

    Thank you in advance for any help.

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: unable to use controls in Code (a2K)

    I would guess from your post that you have a field called

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: unable to use controls in Code (a2K)

    There's an add-in on Helen Feddema's site that will apply naming conventions to your objects.
    Charlotte

  4. #4
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Arkansas, USA
    Posts
    163
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: unable to use controls in Code (a2K)

    Thank you both for the help. I will try to use the Add-in.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •