Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2004
    Location
    Atlanta, GA
    Posts
    58

    Unanswered: Event - Datasheet

    I have a form in datasheet view and when I click on the record selector I want to open another form that shows the details. What event is the record selector? I am using the following code but I don't know the event:

    Code:
    Docmd.OpenForm "form name",,,"field=" & me.field
    Thanks in advance.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    I believe you need to use the AFterUpdate event.

    If I remember correctly, this event fires whenever the current record for the form changes.

  3. #3
    Join Date
    Mar 2004
    Location
    Atlanta, GA
    Posts
    58
    I don't want to update it just view all of the details. I want to be able to click on the record selector in datasheet view and launch another form with all of the data in it.

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    So you want to click on the little triangle to the left of the currently selected record and launch another form?

    Can't do it.

    The record selector itself is not an object that you can manipulate.

    I assumed you meant that when you go to a new record by moving the selecter, you wanted to open a form. You could use a tight continuous form and put a small button on each record with the relevant code if you'd like..

  5. #5
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    Sure you can do this.

    I typically put this code on the OnDoubleClick event. That allows the user to select a record (single-click) on the subform without launching the detail form. Many times I have activities associated with the single-click which are distinct from the double-click and for the single-click event I use the OnCurrent to trigger the action.

  6. #6
    Join Date
    Mar 2004
    Location
    Atlanta, GA
    Posts
    58
    Originally posted by PracticalProgram
    Sure you can do this.

    I typically put this code on the OnDoubleClick event. That allows the user to select a record (single-click) on the subform without launching the detail form. Many times I have activities associated with the single-click which are distinct from the double-click and for the single-click event I use the OnCurrent to trigger the action.
    Thanks..

  7. #7
    Join Date
    Nov 2003
    Posts
    1,487
    You can also change your Form from Datasheet view to Form view and display the record that way:

    In the On Click event of your Form (and assuming a field named "RecordID" is located on the form):

    DoCmd.RunCommand acCmdFormView
    DoCmd.GoToRecord acDataForm, "myFormName", acGoTo, Me.RecordID


Posting Permissions

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