Results 1 to 5 of 5
  1. #1
    Enrightt is offline Novice
    Windows 8 Access 2007
    Join Date
    Oct 2015
    Posts
    10

    Dynamic Text Positioning in Report Based on Separate Field Length

    Hello all!



    I'm a very basic Access user and I could use your help.

    For the report I'm trying to create, I'd like to format the design of the text so that it dynamically positions based on the length of a previous and separate field.

    For example, at the head of each page, I'd like a sentence as such:

    Summary Report generated for [XYZ Company] for the month of [Current Month]

    When creating the report, I'd like it to appear as a nice, continuously spaced sentence. However, the company name field [XYZ Company] could be from ~10 to up to 50 characters.

    Is there a way to bind the rest of the phrase so that it auto-adjusts its position to the length of the [XYZ Company] field and automatically position itself to appear to be coherent sentence?

    Thank you very much!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    A textbox control source like:

    ="Summary Report generated for " & [CompanyField] & "for the month of " & [MonthField]
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Oh, and if you meant the current month not coming from the data, you can use any of the various date functions, like

    Format(Date(), "mmm")
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    Enrightt is offline Novice
    Windows 8 Access 2007
    Join Date
    Oct 2015
    Posts
    10
    Quote Originally Posted by pbaldy View Post
    Oh, and if you meant the current month not coming from the data, you can use any of the various date functions, like

    Format(Date(), "mmm")
    Thank you very much!

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 07-20-2015, 10:45 AM
  2. UPDATE QUERY to Separate Numbers from Text in a Text Field
    By pjordan@drcog.org in forum Queries
    Replies: 2
    Last Post: 05-29-2015, 02:44 PM
  3. Replies: 3
    Last Post: 05-06-2014, 10:17 AM
  4. Reports positioning boxes with text content
    By pierre86 in forum Reports
    Replies: 2
    Last Post: 09-15-2013, 01:05 PM
  5. Convert number to fixed length text field
    By tpcervelo in forum Queries
    Replies: 1
    Last Post: 08-02-2010, 07:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums