Results 1 to 6 of 6
  1. #1
    gori1084 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    May 2014
    Posts
    36

    Unbound form not populating

    Hi everyone,



    I'm developing this database and I'm posting hoping that I can get some insight by more experienced Access users.

    Revised yet again V2_Backup.zip

    The attached requires login upon opening. Please use these credentials, tho no confidential info is in the file.

    User: 556494
    PW: cesar

    I'm aware of some issues with the login form and I'll get to those later. At the moment I am interested in the form called SponsorsNew (the one that opens up upon logging in).
    The UserRegion field is inherited from the login screen and upon selecting a sponsor from the combobox, the sponsor ID is populated in a beside field. Below you see the list box. That listbox is supposed to be populated with all counterparties (sponsors have one to many relationship with counterparties). I set up an after update event that should display only counterparties that have the sponsor ID equal to the one selected and that belong in the same UserRegion. I can't get it to work, I suspect because I'm not getting the requery function to work right.

    Could you please take a look and help me out with this. I'm pretty new at Access and I could use some guidance.

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Your description is about How you have done something and how it's supposed to work.
    Can you step back and tell us WHAT the data base is about? What is your "business"?
    Until readers understand WHAT you are trying to do, it will be difficult to suggest HOW it could be done and the options you may have.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    If the form is Unbound, the Requery method will not work.

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    You cant requery an unbound field (or form). You can only assign values to unbound controls.... txtBox.value = "bob".

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Code:
    Private Sub SelectSponsor_Change()
    Me.Requery
    'ADD THE LINE BELOW 
    List14.Requery
    End Sub
    You have to requery the list box separately from the form. In this case your list box is named List14 so you issue a requery command to the listbox

  6. #6
    gori1084 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    May 2014
    Posts
    36
    Thank you so much rpeare, that's precisely what I needed.

    To those who asked what is the database about: I will respond because this is a forum about working with Access so I might as well tell you what I use it for. However, I should say that I've been asked by more senior members to keep my questions straight and to the point. I apologize if this confused someone, I tried to keep the forum line where I posted on topic.

    The database is to be used as a repository for funds that my company services and it has to be multilayered. Because sponsors are in a one to many relationship with counterparties, I am constantly challenged to show them both, which means creating forms that can make navigation easier. Yes, I could use the form wizard and make bound forms if that's all there was to it but the set up and the needs require the added flexibility and customization that only unbound forms can offer.

    I hope this clarifies. Sincerely, thank you all so much for reading and sharing your knowledge with me.

    B

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

Similar Threads

  1. Replies: 9
    Last Post: 06-02-2014, 08:10 AM
  2. Replies: 14
    Last Post: 05-13-2013, 04:27 PM
  3. Populating a Continuous Form with Unbound Fields
    By gazzieh in forum Programming
    Replies: 6
    Last Post: 02-28-2013, 11:11 AM
  4. Populating unbound related tables
    By JoelBR in forum Access
    Replies: 11
    Last Post: 11-17-2012, 06:59 AM
  5. Replies: 0
    Last Post: 05-09-2010, 08:43 AM

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