Results 1 to 12 of 12
  1. #1
    Elad is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    6

    How to add Row number in MEMO field in a report?


    Hi,

    I have a report that has a memo field with a few paragraphs.
    I want to add row numbers on the side, preferably the first row and then every 5 rows (1, 5, 10, 15...).
    I don't know VB but if you have a solution that requires programing I can ask a friend to help out.

    Any ideas?
    Tnx in advance,
    Elad

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    What do you mean by 'row' - a record? Or each line in the memo textbox?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Elad is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    6
    each line.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    IMO, what you ask for would be EXTREMELY difficult to accomplish. So difficult I would never even try.

    What purpose would this numbering serve?

    Why does this field have paragraphs?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Elad is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    6
    It's a report that shows a text and then some questions. It's a Reading Comprehension quizz, and I need the line numbers on the side of the text because in some of the questions the line number is mentioned (as reference).
    Up untill now I did it in WORD but now I transferred everything to access, it is easier and saves editing time (when I need to edit 50 passage based reading quizzes).

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Doesn't alter my assessment.

    Suggest you annotate the numbers into the memo content, like footnote notation.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Elad is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    6
    Worst case I can enter every line into a different row, I wanted to avoid that...

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Another approach is to type the text with forced CrLf where you want each line to break and type in numbers and spaces to align as you wish.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Elad is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    6
    Yup, it just makes everything much more complicated.
    I'll do it one way or the other.
    Tnx again for your help

  10. #10
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    the problem you will have is if the width of the control changes or the font or font size changes (e.g. from form to report), potentially so can the number of rows.

    If you are using a memo field, rather than referring to a row number, why not use highlighting or change font colour or style?

    But here is another thought. Rather than embedding the row number in your text, have a separate control with the same font etc but sized say two characters wide and with a source of

    Code:
    "01" & vbcrlf & vbcrlf & vbcrlf & "05"  & vbcrlf & vbcrlf & vbcrlf & vbcrlf & "10" & .....
    set the control to the left of your memo control and the same height.

  11. #11
    Elad is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    6
    Thank you it works!!!
    Such a simle and elegant solution, easier than any others and no code was needed.
    Frankly, I'm a little disappointed I did not think of it myself, but it's like Columbus's egg...
    Tnx

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    As Ajax stated, the line breaks could change if the memo textbox is resized but I guess once you have it set properly should never have need to change. I am also disappointed I did not think of this. Oh well, glad you have a solution.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 9
    Last Post: 07-21-2014, 11:57 AM
  2. Report Truncating Memo Field(s)
    By alexbumgardner in forum Reports
    Replies: 5
    Last Post: 07-18-2014, 11:13 AM
  3. Memo field 'white box' to display on Report
    By noaccessguru in forum Reports
    Replies: 8
    Last Post: 09-02-2013, 12:21 AM
  4. Replies: 6
    Last Post: 07-03-2012, 12:27 PM
  5. Replies: 1
    Last Post: 03-10-2012, 03:22 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