Copy item from one datasheet form to an other

Never Hide

Registered User.
Local time
Today, 17:02
Joined
Dec 22, 2011
Messages
96
Hello everyone,

I have two tables "Products" and "Sales". I have a Main form with a sub-form in it that displays all of my Products in the "Products" table which is in datasheet form.
I want to create another form for my "Sales" table in which I will add items from the "Products" table. I want it to be in datasheet as well. You will select an item from the form with the products, click an "Add" button and the selected product will be added in the Sales form.

Could you please help me out a because I'm stuck and can't figure out how to do it:o
 
Why not have a combo box, that lists the products, on the Sales form and sellect a product from the combo box.
 
Hi bob,

the reason is that it's more user friendly to select the item you want from the list of products, and with a single button click to add that product in the Sales form
 
Perhaps I'm missing something here, but how can you say that it would be more user friendly. The user will need to click a button to open the selection form. Find the product(How will that be done?). Then click another button to make the selection? AFAIK you can not have a button on a form in Datasheet view.

With a combo box that drops down when it gets the focus the user may be able to make the selection with a single click.
 
You can't add a button to a datasheet view, but you can do a trick.

Add a field to the query, for example:
Edit:"Edit"
Drag the field on to the form as a TextBox
Set the TextBox's Is Hyperlink property to Yes
Add a procedure to the TextBox's OnClick Event, which opens your pop-up form.

Then it looks like showed at the attached picture.
 

Attachments

  • HyperL.jpg
    HyperL.jpg
    27.6 KB · Views: 86
You can't add a button to a datasheet view, but you can do a trick.

Add a field to the query, for example:
Edit:"Edit"
Drag the field on to the form as a TextBox
Set the TextBox's Is Hyperlink property to Yes
Add a procedure to the TextBox's OnClick Event, which opens your pop-up form.

Then it looks like showed at the attached picture.
Yes, I know we can often find a way around the limitations of what can or can't be done. The point I am trying to make to the OP is that using a combo box is, IMHO, would be the best way of making a selection choice available to the user.
 
Thank you all for you time,

I'll post 2 screenshots and I hope it'll help clear what the interface is like and what I'm trying to do.
The "Products" is where I can see a list of my Products. As I said it's a form with a sub-form in it. That sub-form gives me the list of my products. I select an item and click the "Add" button. The selected item will then be added in the "Sale" form.
The "Sale" form again has a sub-form in it and in that sub-form all the items that I select will be added. Both forms will be open at the same time.I think it's simpler to just select the item you want and hit the "Add" button to add in the current Sale that you are working with
 

Attachments

  • Products.PNG
    Products.PNG
    38.2 KB · Views: 91
  • sale.PNG
    sale.PNG
    31.1 KB · Views: 88

Users who are viewing this thread

Back
Top Bottom