Results 1 to 4 of 4
  1. #1
    altemir is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    31

    Subform Not Populating - Recordsource Assignment


    I have an unbound subform that is not populating although I have confirmed that the underlying table indeed has records. Why??? What on earth is wrong with this code? It goes blank as soon as the .Recordsource assignment gets executed.

    Me.subCustomers.Form.RecordSource = "tblCustomers" Me!subCustomers.Requery

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    51,324
    Is subCustomers the name of the form or the container control that holds the form? I always give the container a name different from the object it holds, like: ctrCustomers.

    Me.ctrCustomers.Form.RecordSource = "tblCustomers"
    Me.ctrCustomers.Requery
    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
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    June7 -

    Me.ctrCustomers.Requery should be
    Me.ctrCustomers.Form.Requery should it not?

    I know for A2003 it does.

    John

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    51,324
    It works as suggested in my 2007/2010 project, which was originally built as mdb (don't remember if that code was in the mdb). But I have both syntax in my project.
    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: 8
    Last Post: 03-16-2012, 11:04 AM
  2. Not lookup, but assignment
    By ArmyLT in forum Database Design
    Replies: 3
    Last Post: 11-17-2011, 02:35 PM
  3. Replies: 5
    Last Post: 11-16-2011, 07:30 PM
  4. Update Subform Recordsource
    By mystifier in forum Forms
    Replies: 8
    Last Post: 11-15-2010, 03:03 AM
  5. update recordsource of subform
    By AndyKim in forum Forms
    Replies: 1
    Last Post: 06-16-2009, 09:15 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