Results 1 to 4 of 4
  1. #1
    dpscott is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2014
    Location
    PA
    Posts
    2

    Form Dependencies

    Hello All,

    I have an "Overall" form that has many sub forms. The first sub form is a project information form. The second sub form is a sample information form.

    The project information could have many sample information records, so I would like when I select a project record in the project information form, the sample information form displays only the sample records associated with that project record.



    Click image for larger version. 

Name:	Database Example.jpg 
Views:	8 
Size:	44.6 KB 
ID:	16851

    Any Help would be appreciated.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Are you familiar with the RecordSource property of Subform Controls/Containers?

    Are you familiar with and able to write VBA?

  3. #3
    dpscott is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2014
    Location
    PA
    Posts
    2
    No to the first, and yes to the second.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I would write VBA to cause the Subforms to be dynamically dependent on the previous (parent) subform.

    I would use the RecordSource property. Another option is to use the Filter property. I do not like the filter property because this property may be able to be changed by the user if they have access to intrinsic Filter tools.

    There are a couple drawbacks to this approach. You need to build a where clause by concatenating the variables into a WHERE Clause. There is a limit to how many variables you can add onto a WHERE clause.

    If a Subform's recordsource uses a Named Query Object you can cause the Recordsource to be Dynamicaly dependant on declared variables using something like
    Me.SubFormContainer2.Recordsource = "SELECT * FROM queryname WHERE [FieldName] = " & MyLongInteger

    What this approach is doing is using a standard search form technique. The entire technique is not illustrated here. Just giving you a taste to see if this may be appropriate.

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

Similar Threads

  1. Replies: 2
    Last Post: 03-17-2014, 11:51 AM
  2. checkbox dependencies
    By jle0003 in forum Forms
    Replies: 1
    Last Post: 10-11-2012, 01:57 PM
  3. Object dependencies
    By Rob S in forum Access
    Replies: 4
    Last Post: 08-03-2012, 04:00 PM
  4. Form Dependencies
    By Juan4412 in forum Forms
    Replies: 15
    Last Post: 06-20-2011, 06:40 PM
  5. Output Object Dependencies
    By Tigger in forum Database Design
    Replies: 3
    Last Post: 04-28-2011, 08:18 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