View Full Version : Double Click Event for Datasheet


cturton
06-10-2000, 05:36 AM
Hi!
I have a datbase that tracks equipment rental. The user can use a query to see the datasheet I built, which tells him what equipment is rented for a specific date range. The user would like to click on the date field of a row in that datasheet to highlight it, then double click to open the reservation form associated with it and view all details. I built this so each reservation form has a unique autonumber field, so I do have a method to find it. Any suggestions on a double-click expression I could build to accomodate their request?

Thanks in advance

Carol
06-10-2000, 06:05 AM
Try the following Event Procedure on the Double Click:
Private Sub Details_Click()
DoCmd.OpenForm FormName:="ReservationForm", WhereCondition:="[ReservationID] = " & Me!ReservationID
DoCmd.Close acForm, Me.Name
Forms![ReservationForm].SetFocus
End Sub

Change ReservationID to your name of your unique identifier.

Good luck.

cturton
06-10-2000, 02:22 PM
Thanks Carol! Live long and prosper!

Casey