Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Morecambe England, Lancashire, England
    Posts
    105
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Formating expressions in Access (Office 2000)

    I have the problem that if I want to use the expression:-

    =(

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Formating expressions in Access (Office 2000)

    You can leave the Control Source as [Income] or =Sum([Income]).
    Set the Format property of the field or text box to "The income from this fund is

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Morecambe England, Lancashire, England
    Posts
    105
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formating expressions in Access (Office 2000)

    Dear Hans,

    Sorry to be a pain but perhaps what I didn't make clear was that the text box was in a report.

    I did try what you suggest by setting the format in the properties box and it does not work.

    I agree that option 3 is fine but I would like the whole line left aligned if I can get it.

    The thing I don't understand is why my bit of formatting works perfectly on [Income], but will not work on sum[Income]. Is there a way of doing something like [Totalincome]=sum[income] and then formatting [Totalincome]. If you can do it in code then I would be very grateful if you could spell out what I need to put as it will solve a lot of other problems

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Formating expressions in Access (Office 2000)

    Setting the Format property in a report should work too, regardless of whether the text box is bound to a field or is calculated.

    I have attached a little demo (Access 97, zipped) with a report that demonstrates this. There is no code at all. Look at the Control Source and Format properties of the text boxes.
    Attached Files Attached Files

  5. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Morecambe England, Lancashire, England
    Posts
    105
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formating expressions in Access (Office 2000)

    Dear Hans,

    I am very greatful for your help - My expanation of what I was trying to do was not very good, but your sample explained it. What I should have explained was there was another variable in there as well!.

    I have taken the liberty of sending a modified version of your file back to you so you can see just what I mean. What you says works, But not if there is another vaiable in there like company.

    Can you think of a way round it please

    Michael
    Attached Files Attached Files

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Formating expressions in Access (Office 2000)

    Well, in that case you can't use the Format property because the "fixed" part is not fixed. So you must use the Format function after all:

    ="Total for the " & [Company] & " company is " & Format(Sum([Amount]),"

  7. #7
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Morecambe England, Lancashire, England
    Posts
    105
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formating expressions in Access (Office 2000)

    Dear Hans,

    Fantastic, but so frustrating, I simply hadn't realised that the formatting it could be put after expression.

    Thank you so much for all the trouble you have taken.

    Michael

Posting Permissions

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