Results 1 to 3 of 3
  1. #1
    baktash is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2011
    Posts
    2

    Cool Open subform based on a specific field on main form

    Hello all,



    I am new here and I like some help with a filtering issue I am having with opening a subform based on a value in a specific field in the main form.

    1. I have two forms (Transmittal form and Document form). The Document form is actually a subform to the Transmittal form. Both forms are linked based on a field called Transmittal Number.

    2. There is a button on the Transmittal form that opens the Document subform. When the Document subform opens, I like it to be filtered based on the current Transmittal Number field.

    Sounds simple but I can't seem to get it to work. I would appreciate a simple and easy way of doing this process. Thanks in advance everyone.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I don't think you're using subform the way it was intended. subforms are displayed on the current form. The way you are describing it you are clicking a button (or some other method) to open a completely different form and show a subset of data (your document form). If this is the case you probably need to set the RECORD SOURCe of your documents form to a query (NOT your documents table by itself) and put a criteria in the TRANSMITTAL NUMBER field of forms!<primary form name>!TRANSMITTAL NUMBER.

    This assumes of course the text box with your transmittal number on your primary form is actually called transmittal number, if not, just change it to whatever the name of the text box is.

  3. #3
    baktash is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2011
    Posts
    2
    thanks rpeare,

    Well, I got it to work using a simple query with "[Forms]![f_transmittal]![Text27]" in the field criteria. But now, my "duplicate" command doesn't work properly in the subform.

    do you have any suggestions on how to duplicate the selected row with its entire content onto a new row?

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

Similar Threads

  1. Replies: 4
    Last Post: 04-20-2013, 10:12 AM
  2. Subform Combobox based on Main form combo box
    By accessmom in forum Forms
    Replies: 5
    Last Post: 02-21-2011, 07:02 AM
  3. Subform Filter based on Main Form Information
    By james.carpenter2 in forum Forms
    Replies: 0
    Last Post: 02-16-2011, 09:55 PM
  4. Replies: 1
    Last Post: 11-16-2010, 08:42 AM
  5. Replies: 1
    Last Post: 06-14-2010, 02:31 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