Results 1 to 7 of 7
  1. #1
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496

    unable to assign a vaule to text box in footer of a subreport

    I have a simple subreport where I want to assign a value to a text box in its footer, but am getting an error, and unable to assign...
    I've tried moving the code in to multiple events (open, load, format, <etc>...) but none of them seem to work ?


    in it's simplest form the code is:

    Private Sub ReportFooter_Load(Cancel As Integer, FormatCount As Integer)
    If something...
    Me.txtInstallationNotesAtFooterAbout.Value = "Refer to end of Fixture Schedule for additonal notes about... "


    else
    Me.txtInstallationNotesAtFooterAbout.Value = "some other message..."
    End Sub

    in advance, thanks, any thoughts would be greatly appreciated
    mark

  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
    What error? I'd use the format event of that section. What is the control source of the textbox?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496
    the error is
    #2448 "can't assign value to this object"

    the control souorce for the text box is empty (nothing)

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Not sure why it's not working then. Can you post the db here, or a representative sample?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496
    later tonight, I'm going to play with it a little more; my hunch is that it's something stupid (like I have a control with the same name on the parent report that is causing a conflict, or "something" else...) If I still can't find the glitch, I'll be back, and either way, I'll let you now

    again, many thanks in advance,
    mark

  6. #6
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Pardon me for jumping in here but you have shown us:

    If something...

    which may be very important part here. I've been able to use the code you had successfully even if I refer to a field on the report which ends up the last record is what determines what will show up in the footer. But it is the question of what are you asking.

    The other possibility is corruption - if something that should logically work and no other cause can be found it is likely corruption. Try importing (import, not copy and paste) the report into another database shell and reimport it back (making sure that Name AutoCorrect is turned off).

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Gotcha. I did do a quick test and had no trouble setting an unbound textbox in the report footer's format event.
    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. How to assign criteria for Yes/No?
    By AccessThis in forum Queries
    Replies: 1
    Last Post: 07-20-2010, 03:51 PM
  2. Replies: 3
    Last Post: 03-30-2010, 01:21 PM
  3. Replies: 2
    Last Post: 03-27-2010, 10:52 AM
  4. assign value from list
    By roman.pro in forum Forms
    Replies: 0
    Last Post: 05-16-2009, 04:20 PM
  5. Replies: 0
    Last Post: 04-13-2009, 04:02 AM

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