Double-Click in Datasheet

A

Allan Skyner

Using Access 2000.
I have 3 tables;
Suppliers (listing all supplier details with unique SupplierID).
Products (2 columns listing ProductID and ProductName)
Contract (3 columns listing unique ContractID, SupplierID and ProductID)

On my main form showing all details per supplier from suppliers table and
listing products supplied by supplier in a list box.

Currently there is a command button on my form1 that opens another form2 to
add a product to a supplier using a text box to enter the 8 digit ProductID
(if known). If not known, on form2 there is a command button that opens
another form3 which enables users to free text search the
products.productname field and the results are displayed in form4 in
datasheet view. This allows the user to find and read the correct ProductID
and then close form4 & form3 and then enter the right ProductID using form2.

This is a lot of command buttons and forms which I am trying to reduce,
merge or simplify. My plan is to merge the functionalities from form2 & 3
into one, which I can safely manage.

What I would like assistance with, if possible, is that when a user does a
search which opens the resultsform in datasheet view (2 columns ProductID,
ProductName) I want them to have the ability to double-click the right
ProductID and this adds that code to that supplier (i.e. the SupplierID and
ProductID are added to the Contract table).

It is more likely that there will be several products added from a single
search, this is why I would like to simplify operations so users can simply
scroll down the list double-clicking the ProductID's that each supplier
supplies.

I'm sure this can be done using the double-click event procedure, I'm
getting a bit lost with the code to complete the task.

Sorry this is a bit long-winded and I thank anyone in advance of some
assistance with the code or some pointers in the right direction.

Best regards

Allan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top