Results 1 to 6 of 6

Thread: Selected row in Access subform datasheet? [resolved]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    Question Selected row in Access subform datasheet? [resolved]

    I have a datasheet subform on an Access form and I want to allow the user to select a record via the record selector column at the far left, and then I'll process that in VBA code.

    The problem is:
    in the form_click event I can get Me.CurrentRecord OK and run with that,
    BUT, clicking on a column header also fires this event and always returns CurrentRecord=1
    and I can't figure out how to differentiate between actually selecting row 1 and clicking on a column header.

    Any ideas? Thanks, DaveBo
    Last edited by DaveBo; Nov 18th, 2003 at 11:30 AM.
    "The wise man doesn't know all the answers, but he knows where to find them."
    VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15

  2. #2
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    Austin
    Posts
    397
    you want the user to be able to click on the record or column and have it do an action?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    Yes

    I was hoping to let the user click on a row in the "record selector" column, then fire up a VBA routine to go into a new editing form ...

    Everything works fine except that clicking on a column header looks to the code exactly like the user selected row 1.

    As a "work around" I've just added an "edit record" button.

    I think for every MS app there should be a real-world "work around" manual written by the folks who actually make things work.

    To the tune of Dion's "The Wanderer"
    Cause I'm a programmer, yes, I'm a programmer, I work around around around around around ...
    "The wise man doesn't know all the answers, but he knows where to find them."
    VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15

  4. #4
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    Austin
    Posts
    397
    Let me see if we are on the same page.


    I have more than one db that users click on records in a subform and the parent form will re-query the data to fit the criteria of that record.


    Is that close?

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    Single Access DB

    No, just 1 Access .MDB file.
    Just wanted to open a table in a form in datasheet view and be able to select a record using the record selector column at the left margin, and trigger the form_Click event.

    The only issue is that clicking on the column name/header field also fires this event and looks exactly like I selected record #1 within the VBA code.

    But, I'm all set. Just another little bump in the MS road.

    Thanks, DaveBo
    "The wise man doesn't know all the answers, but he knows where to find them."
    VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15

  6. #6
    New Member
    Join Date
    Apr 2011
    Posts
    1

    Can you share your solution?

    Can you share your solution? I've been trying to work out the same thing today. Thanks!

Posting Permissions

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



Click Here to Expand Forum to Full Width