Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Chnage column widts in function (Acces 2000)

    I have a function where i must change the column widths and then change them again at the end.
    I want to change the Column widths of a list box with the following command:

    Me![list].Column widths = 0cm;1,06cm;2,12cm;3,732cm

    However,Access shows with red letters that my command is not right.
    Can somebody help me ?

  2. #2
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Chnage column widts in function (Acces 2000)

    Does this help:

    Me![list].Column widths = "0 cm;1.06 cm;2.12 cm; 3.732 cm"

    Note the " before and after .

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

    Re: Chnage column widts in function (Acces 2000)

    As Dave point out, the setting is a string. However, I also noticed that you had a space in "Column Widths". Make sure there is no space in there in your code or you will still get a syntax error.
    Charlotte

  4. #4
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Chnage column widts in function (Acces 2000)

    Sorry about that, I never compiled my test over here because the text didn't return to red.
    I should know better. !!

Posting Permissions

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