Page 2 of 2 FirstFirst 12
Results 16 to 28 of 28
  1. #16
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    Nothing ever equals Null . You have to use



    If IsNull(Me.Alt) Then ...
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  2. #17
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Did you try my suggestion, there is no need for VBA here....

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #18
    Kasperczak is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    21
    Quote Originally Posted by Gicu View Post
    I think you're overcomplicating things. Have just one textbox on line one and set its Control Source property to =[Term] & " (" & [Subject] & ")"

    Cheers,
    Thanks. I tried that but am now getting #type! at every iteration. I checked and re-checked to make sure that the syntax was correct and it is. Obviously I am still missing something. The two source fields are of type Short Text.

  4. #19
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Can you please upload a screenshot of the report in design view with the text box and its associated Properties window with the Control Source?

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #20
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    You need to rename the textbox from Term to txtTerm or something else, the #Type is caused by circular reference, please see the attached sample.

    Cheers,
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  6. #21
    Kasperczak is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    21
    Quote Originally Posted by Minty View Post
    Nothing ever equals Null . You have to use

    If IsNull(Me.Alt) Then ...
    Natually!

    That worked so I now have a way of dealing with the 'See also' line mentioned in the OP.

  7. #22
    Kasperczak is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    21
    Quote Originally Posted by Gicu View Post
    You need to rename the textbox from Term to txtTerm or something else, the #Type is caused by circular reference, please see the attached sample.

    Cheers,
    Yes, that was it. The database field was named 'Term' and the name automatically was re-used by the report wizard to name the text box. I renamed it as suggested and it now works. I thought it was something silly like that, just couldn't see it.

    This is getting very close. Thank you for the suggestions. One final part of the puzzle now that Term and Subject data are in one text box, is how to format the subject text within the brackets to make it italics. Any formatting now seems to be applied to the whole text box. Would this be a job for conditional formatting or some other feature else?

    I will continue with this again tomorrow. Thanks.

  8. #23
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Here you go, you need to change the textbox Text Format property to Rich Text and add Italics tags to the Subject portion:
    Click image for larger version. 

Name:	Screenshot 2023-02-22 103821.jpg 
Views:	25 
Size:	270.0 KB 
ID:	49756
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  9. #24
    Kasperczak is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    21
    I did wonder whether it was possible to insert some kind of markup but I didn't change the Text format to Rich Text. That made all of the difference. Thank you.

  10. #25
    Kasperczak is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    21
    Ok, so the final part of the puzzle is this - when printing a report, how do I get a field to print such that the complete text is printed?

    Currently, for the description field, the text gets truncated and only part of the first line gets printed. How do I get it to automatically expand and print the full content of the field?

    This is a long text field and may contain several sentences or even multiple paragraphs. I have both Can Grow and Can Shrink properties test to 'Yes'.

    UPDATE: I *think* I may have found the answer. The Can Grow and Can Shrink properties of the report field need to be set to 'Yes' as well. This works on the sub-report, but now I can't get the main report to do a print preview. It is asking me for the value of the Term field and complains that some macro could not be executed. I don't have any macros defined AFAIK and can't find what is causing this.

    Click image for larger version. 

Name:	report-err.png 
Views:	13 
Size:	16.3 KB 
ID:	49802

  11. #26
    Kasperczak is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    21
    Ok, I think I solved it. There was some code in VBA that I added earlier for debug purposes. I removed that and it now works OK.

    Just one final detail to sort, which is how to remove/hide the horizontal scroll bars from the sub-report.

  12. #27
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Quote Originally Posted by Kasperczak View Post
    Ok, I think I solved it. There was some code in VBA that I added earlier for debug purposes. I removed that and it now works OK.

    Just one final detail to sort, which is how to remove/hide the horizontal scroll bars from the sub-report.
    Change the Scroll Bars setting on the Format tab of the sub reports property sheet.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  13. #28
    Kasperczak is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    21
    Thank you. I spent a long time searching but could not find the ScrollBars setting. Eventually I discovered that if one selects Layout View and then clicks the sub-report to select it, the ScrollBars property then magically appears in the properties list! The ScollBars property can then be set to 'None' and both scrollbars disappear. The Control bar then appears from underneath the horizontal scrollbar! One then has to set the ControlBar property to 'No' and that disappears as well, but only after closing the report layout view, saving and and opening it again. I presume this is a design oversight along with the horrible scrolling glitches which cause only part of the form to scroll leaving two thirds from the left static. Very frustrating!

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 10-27-2022, 07:32 PM
  2. Replies: 3
    Last Post: 12-02-2017, 02:04 PM
  3. Replies: 3
    Last Post: 04-24-2016, 07:24 AM
  4. Autosize a column's width and height?
    By Isla in forum Reports
    Replies: 1
    Last Post: 04-05-2016, 01:58 PM
  5. Replies: 12
    Last Post: 05-07-2012, 12:41 PM

Tags for this Thread

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