Results 1 to 2 of 2
  1. #1
    DanT is offline Novice
    Windows 11 Office 365
    Join Date
    Sep 2022
    Posts
    23

    Passing argument from subforms to main form

    Hi there, I'm looking for a way to pass an argument from subforms to a main form. Below is a simple form to assign contact to address. I'd like to pass Site ID and Contact ID to the main form by selecting relative records from subforms. This works great the other way around by showing already assigned values, but I'd like it to be an entry form. Normally combo box would cut it but I'm expecting many records in both tables and as far as I'm aware there's no option to sort and filter combo boxes by end user, hence subforms. Would someone please point me the easiest way to do this?



    Click image for larger version. 

Name:	AssignForm.png 
Views:	18 
Size:	62.3 KB 
ID:	48746

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    This is what comboboxes and listboxes are for. However, if the subforms are not linked to main form, some event code could populate the main form textboxes. Real trick is figuring out what event. Perhaps the form Click event. User would have to click on the record selector area on left side of form.
    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. can't put 2 subforms on a main form
    By cjohnson in forum Forms
    Replies: 6
    Last Post: 04-28-2017, 01:19 PM
  2. Passing an ID from both main form and subform
    By tonycl69 in forum Reports
    Replies: 3
    Last Post: 04-27-2016, 06:47 AM
  3. Replies: 11
    Last Post: 05-13-2015, 11:10 PM
  4. Opening form with passing argument
    By eacollie in forum Forms
    Replies: 3
    Last Post: 06-03-2011, 09:37 AM
  5. Replies: 0
    Last Post: 12-16-2008, 07:49 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