Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Unanswered: Formatting in Access 2000 ...

    Hi All.

    Well another tricky (as far as I can tell) question for you ...

    I have a report I'm developing where I'm concatting various pieces of data together. My last piece of data is distributions. The issue I'm having is that the distribution name is from 3 to 8 digits long. I'm currently using the following code to format each distribution:

    Dist=Format(DistTxt,"!@@@@@@@@") & space(7+(8-len(DistTxt))) & Format(EHours,"#,##0.0")

    My Issue: What displays is a ragged list of hours following the distribution Ex:

    CARP 1.0
    DESIGN 1.0
    ELEC 1.0


    I'm trying to even out the hours so that they list in a straight line ... Any thoughts?

    The complicating factor is that this report displays in Times New Roman 10pt True Type (variable width font)

    Thanks!

    - Mike
    Back to Access ... ADO is not the way to go for speed ...

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    It's a report right? Why not use two textboxes? The user will never know...

    The fact that it's printed in variable width font makes it physically impossible to lign up your numbers using anything but seperate controls.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by Teddy
    It's a report right? Why not use two textboxes? The user will never know...

    The fact that it's printed in variable width font makes it physically impossible to lign up your numbers using anything but seperate controls.
    That is true (on all points) ... Ted, keep in mind that I'm using a memo field for the data and concatting the various pieces into it and then displaying in a single text box ...

    You think it would be possible to assign the text box thru the backdoor? I do need the Can Shrink/Grow ability here ...

    Means that I'd need to move the textbox to a header/footer and then have the 2 textboxes for the distribution in the detail section ...

    It might work.
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    You lost me there. I'm saying take this:

    Format(DistTxt,"!@@@@@@@@")

    and put that in one textbox with no border. Set it to left-align. Then take this:

    Format(EHours,"#,##0.0")

    and put it in it's own textbox with no border, snug up next to the first textbox. Set it to right align.

    Profit.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by Teddy
    You lost me there. I'm saying take this:

    Format(DistTxt,"!@@@@@@@@")

    and put that in one textbox with no border. Set it to left-align. Then take this:

    Format(EHours,"#,##0.0")

    and put it in it's own textbox with no border, snug up next to the first textbox. Set it to right align.

    Profit.
    Uh Ted. I got that ... I didn't fall off the programming truck yesterday ... (It was the day before ) ...

    Where did I lose you? What I am doing is running my VBA code querying tables and concatting the results together and putting that into a memo that my report displays. THE LAST bit of data pulled and added is the distribution stuff ... Per my last post, IF I move my textbox from the detail to a header section AND backdoor fill it (VBA code) then have the 2 textboxes in the detail (as you so eloquently restated) handle the distribution display ... It should work.

    - Mike
    Back to Access ... ADO is not the way to go for speed ...

  6. #6
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740

    from the department of bizarre workarounds...

    can you come close with TextWidth?

    loop adding " " until .textwidth gets to some predetermined value. perhaps predetermined by another loop finding the biggest .textwidth amongst your distributions.
    it can't be razor sharp alignment inside the memo cos the " " is clumsy.

    Stephen Lebans has a different approach here

    izy
    currently using SS 2008R2

Posting Permissions

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