Not tried this before, but something worth a go..
Create a global variable in a module (eg GlobVar.strlstValue)
Now, the idea is that when you click and hold your mouse button, this is basically the "Mouse Down" event.. so create a Mouse down event for the first list box with the code:
Code:
lstbox.Value = GlobVar.strlstValue
'it would be sensible to have the primary key as the list box's value...
You could also change the mouse pointer at this stage.
Then, when you 'drag' over to the other listbox, create a "Mouse Up" event for the second list box. Assuming that this second list box has a record source of a different table, you would need to write the code to add the record to this table. I would suggest doing this by doing the following:
Mouse Up event code =
Code:
docmd.openform "frmlstDragAdd"
Create a formand name it "frmlstDragAdd"
Give the record source for this new form as the SECOND table and add all the fields of this second table to the form.
Fun part now.
Create an on open event. add the code:
Code:
docmd.gotorecord,,acnew
'for each field you'll need to look up the record value
'from the global variable and add to fields on form.
dim strF1 as string
dim strF2 as string
strF1 =DLookUp("[FieldName1]","tblSecondTable","[PrimaryKey] = " & GlobVar.strlstValue)
Field1 = strF1
strF2 =DLookUp("[FieldName2]","tblSecondTable","[PrimaryKey] = " & GlobVar.strlstValue)
Field2 = strF2
docmd.close
FINALY!! Create an OnActivate event for the original form (where the two list boxes are) that refreshes the second list box and voila.. the record should appear.
This is the only idea that I could come up with as a solution.. Hope you can understand it, and hope it works for you!! I'm sure they may be a quicker way to do it, but I do not know what it is..
regards
Simon