Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Jun 2010
    Location
    Lichfield, UK
    Posts
    54
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Linking a Form to a Datasheet

    I'm developing an Access application where I have a large form containing details about a Survey Request. This form, called Survey Task Sheet, contains a tab control and the tabs contain either sub-forms or images. These are all working fine. However on 1 of the tabs I want to place 2 subforms - 1 a datasheet view and below it a form view. I want the form view to display a more detailed view of the currently selected row in the datasheet. I have got this working fine when the user selects a whole row in the datasheet (ie clicks to the left of the first data column on the datasheet view) or clicks on any cell within a row on the datasheet, the form below displays all the fields from that record.

    However what I cannot get to work is if the user navigates around the datasheet using the up and down arrow keys. This does not seem to fire any events that I can use to repopulate the form view. Can anyone advise on how I capture the ID of the current row when the user navigates to it using arrow keys?

    PS I am not using Master Child relationships between the datasheet and the sub-form as it is not strictly speaking a subform of the datasheet, they are both sub-forms of the main Survey Task Sheet. I tried making the form a sub-form of the datasheet but could not get it to even display.

    Access 2010 Win7 64 bit

    Screenshot attached.

    Thanks

    rfps.jpg

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,496
    Thanks
    3
    Thanked 42 Times in 42 Posts
    Sorry, it looks like your post got missed somewhere along the line, so this is a late response. I believe your issue is the use of the datasheet - and the recommendation is to use a continuous form that looks like a datasheet. With that approach you get events that you can respond to appropriately, although I don't believe you will be able to link the subform to the continuous form.
    Wendell

  4. The Following User Says Thank You to WendellB For This Useful Post:

    njl100 (2014-02-19)

  5. #3
    Star Lounger
    Join Date
    Jun 2010
    Location
    Lichfield, UK
    Posts
    54
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Thanks WendellB,

    I'll give that a try. Not being able to link it shouldn't be a problem as I can achieve the same thing through VBA code. The trade off will be though that I will lose the filtering and sorting functionality that a Datasheet gives me. I'll put both in front of the user and see what they prefer.

  6. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,496
    Thanks
    3
    Thanked 42 Times in 42 Posts
    Actually, you can still do filtering and sorting on a continuous form using the right-click menus or with icons on the ribbon, assuming you have those displayed.
    Wendell

  7. The Following User Says Thank You to WendellB For This Useful Post:

    njl100 (2014-02-20)

  8. #5
    Star Lounger
    Join Date
    Jun 2010
    Location
    Lichfield, UK
    Posts
    54
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Thanks - I'll give it a go.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •