Results 1 to 8 of 8
  1. #1
    Nick F is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    37

    Refreshing a subform to show newly entered data

    I have a form for entering information on events that we have participated in. I have a tabbed section that has information for partners (subform based on Event_Partners table) we work with on a particular event (first name, last name, organization, etc., etc.). I want to show which partners have already been entered. I figured the easiest was putting in another subform based on the Event_Partners table but in Datasheet view. This one only shows name and organization and not all the other information located on the first subform. I want this lower subform to update/refresh after each piece of information (first name, last name, organization) is entered in the above subform. I can't seem to get it to work. If I close down the mainform or leave the mainform and comback, it shows up nicely. I want it to show up immediately. Any suggestions?

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Refresh or requery the subform???

    Use the after update event of the three controls (first name, last name, organization)??

  3. #3
    Nick F is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    37
    I have tried

    Forms!Event_Main!Event_Partners1_subform.Requery - Doesn't seem to do anything
    Forms!Event_Main!Event_Partners1_subform.Refresh - gives me an error message

  4. #4
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    Assuming that the main form is for a specific Event and the subform is a list of the attendees for the specific Event Link the main form to the subform on the Event When you change the event the subform will automatically change to the attendees for this event. For this to work correctly you need 3 tables. 1 for the Events 1 for the attendees and 1 linking table between the 2 Sample structure:

    Table Event
    EventID
    Eventdescription
    Eventdate

    Table attendees
    AttendeeID
    AttendeeName

    Table eventattendees
    EventID
    AttendeeID

  5. #5
    Nick F is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    37

    showing junction table data

    Assuming that the main form is for a specific Event and the subform is a list of the attendees for the specific Event Link the main form to the subform on the Event When you change the event the subform will automatically change to the attendees for this event. For this to work correctly you need 3 tables. 1 for the Events 1 for the attendees and 1 linking table between the 2 Sample structure:

    Table Event
    EventID
    Eventdescription
    Eventdate

    Table attendees
    AttendeeID
    AttendeeName

    Table eventattendees
    EventID
    AttendeeID

    Thank you for the reply. I think I am on the right track. I created a junction table like you mentioned above. The third table has three fields EventPartnerJunctionID (autonumber), Event_ID, Partner_ID. I linked this table to the Event table using the Event ID and to the Partner table using the Partner ID. Please excuse my elementary questions. Now how do I show the information in my form. I have attached a screen shot. When I hit add record, I would like the name that I have just entered to show up in the blank spot beneath the partner entry form. Thanks.
    Attached Thumbnails Attached Thumbnails Event Form Screenshot.jpg  

  6. #6
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    In the data properties of the subform you should see Link Master Fields, Link child Fields. To the right of Link Master Fields should be EventID. To the Right of Child Fields should also be EventID. This will link the subform to the Main form so that when the record in the main form is changed the subform will also be changed.
    The only think I would change is in the Junction table you don't need the autonumber. Assuming that you will have 1 partner linked to 1 event you can use the EventID and PartnerID Fields As the Primary key for that table the autonumber would just be wasting space as you would never use it for anything.

  7. #7
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    should have been thing not think. typing too fast for my brain to catch up.

  8. #8
    Nick F is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    37
    Quote Originally Posted by RayMilhon View Post
    should have been thing not think. typing too fast for my brain to catch up.
    I couldn't figure out how to get the junction table to function how I wanted. I did find another method. Thank you for taking the time to help me. It was much appreciated.

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

Similar Threads

  1. Replies: 2
    Last Post: 07-30-2012, 03:26 PM
  2. Replies: 3
    Last Post: 06-27-2012, 03:21 PM
  3. Replies: 2
    Last Post: 05-31-2012, 02:41 AM
  4. Replies: 3
    Last Post: 06-02-2011, 07:40 AM
  5. Subform will not show data
    By Brian62 in forum Forms
    Replies: 2
    Last Post: 02-19-2010, 10: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