Access 2000 help! Create form with table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel B
    New Member
    • Aug 2010
    • 33

    #1

    Access 2000 help! Create form with table

    I would like to create a form, with a subform that shows data from several tables. Then I would like to be able to somehow click on one line of data, and it will take you to another form showing only the data from the line that was clicked on.

    I am not great with VB, so if there is a way to do this without using VB that would be awesome.

    I also have a short amount of time to get this done, so ANY comments, tips, or advice would be greatly appreciated.
  • Jerry Maiapu
    Contributor
    • Feb 2010
    • 259

    #2
    You want to click/double click on a line in the sub-form (data sheet view) to open another form showing only the data from the line that was clicked on.

    Good! Did you create the form that needs to be open when clicked?
    If so, then make sure there is at least one unique field is common to the sub form and the form to be opened:
    For example if there is an ID field common to both the forms and the form to be open is frmFormDisplay then:

    On the On_double click event of the field in the subform, add the following:


    Code:
    [I]'DoCmd.close ('add this if you want to close 
    'the sub-form before opening the other form)[/I]
    Dim stDocName As String
        Dim stLinkCriteria As String
    
        stDocName = "[B]frmFormDisplay[/B]"
        
        stLinkCriteria = "[[B]ID[/B]]=" & Me![[B]ID[/B]]
        DoCmd.OpenForm stDocName, , , stLinkCriteria

    Comment

    • Daniel B
      New Member
      • Aug 2010
      • 33

      #3
      Awesome, it worked perfectly. Thanks for keeping the VB nice and simple for me. Thanks again Jerry!

      Dan B

      Comment

      Working...