edit item by double clicking a list control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to double click an item from a list control and have a form pop
up with the item details to be edited. Thanks.
 
I assume that you want to pass the filter from the list box to the form that
you want to open, if that the case, on the DoubleClick event of the list box
you can write the code

Dim MyCondition As String
MyCondition = "[FieldNameInTableToFilter] = " & Me.[ListBoxName]
Docmd.OpenForm "FormName" , , ,MyCondition

=====================
If the field you want to filter is a text type, then change the criteria to
MyCondition = "[FieldNameInTable] = '" & Me.[ListBoxName] & "'"

=====================
 
Back
Top