Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2010
    Posts
    5

    how to pass pk to subform

    dear all,
    i have a problem in my application ,

    i need to pass pk in form 1 to FK in form 2

    there are a relationship(1:n)

    i need when i open form2 ,i finda relation ship in table 2

    i need this urgently

    regards

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

  3. #3
    Join Date
    Mar 2010
    Posts
    5

    help please

    i want to tell me in example because i am beginner in access and i hope example for that .

    regrads

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    All three of those links have examples.

  5. #5
    Join Date
    Mar 2010
    Posts
    5

    what is mean

    thanks a lot ,

    in the first form :

    i write : DoCmd.OpenForm "MediaDescription_F", acNormal

    in the second form

    i not write any thing

    so when i enter data in the first form (Media_F) and click on button that i write into it the code second form (MediaDescription_F) open but i am not find the pk that in enter in the first form

    please help me

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try using the second suggestion link example.

  7. #7
    Join Date
    Mar 2010
    Posts
    5

    anther solution

    thanks for your attention

    but my issue is how to pass value from first form to second form
    and second form is sub form i can not enter data into it until complete data in first form

    regards,

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    So what happens when you use the WhereCondition argument to apply a filter to the second form?

  9. #9
    Join Date
    Mar 2010
    Posts
    5
    i need insert pk in the second form to make a relationship between 2 forms but where condition apply a filter on opening second form
    regards

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    In that case use the 3rd example with OpenArgs.

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

Similar Threads

  1. Pass data from one form to another
    By Bruce in forum Forms
    Replies: 16
    Last Post: 02-25-2013, 03:59 PM
  2. pass value from one form to another
    By ManC in forum Forms
    Replies: 7
    Last Post: 11-25-2011, 09:59 AM
  3. Pass a value from a query to a form
    By cwwaicw311 in forum Forms
    Replies: 22
    Last Post: 03-22-2010, 10:21 AM
  4. Pass a value from a form to another
    By cwwaicw311 in forum Forms
    Replies: 3
    Last Post: 03-16-2010, 12:42 AM
  5. I want to automatically pass a value to a query
    By Slategrey252 in forum Queries
    Replies: 1
    Last Post: 10-01-2009, 05:38 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