Material Order Form

frankbutcher

Registered User.
Local time
Today, 17:45
Joined
Aug 6, 2004
Messages
192
Hi
I have a form, from where I choose the material I require, from the material list table.
The form has 5 combo boxes on it, each combo box is a catagory.
There is also a list box on the form.

When all combo boxes are blank, the list box lists all the materials.
When I choose from the list with Combo 1, the List box filters to the selection in Combo 1
When I choose from the list with combo 2, it filters down again, etc etc for combos 3 to 5.

I highlight the choosen material from the list box, click on add, and it adds it to my material order form, using the code below (as searched from another thread)




Set ctl = Me.List63
For Each varItem In ctl.ItemsSelected
rs.AddNew
rs!Sku = ctl.ItemData(varItem)
rs!MOF = Me.MOF
rs!ProjectNo = Me.ProjectNo
rs.Update
Next varItem



SKU is the Unique ID for the material, and once it is in my material order form, it uses a query to get the price, description etc from the material list table.

This is fine, but I would like to also copy over the price of the material from the material list table to my material order form, so I can change the price if required. I have tried a few things, but it always end up in me changing the material list table, and not the material order form.

Hope this makes sense, and someone can help!

Many thanks.

Frank.
 
can you add the price to the combo box

then you should be able to get the price directly from the ctl.itemdata, although I am not sure of the sysntax without trying it/looking it up.

rs!Sku = ctl.ItemData(varItem)
rs!PRICE = ???
 
Thanks for your replies, much appreciated.

I did try adding the line:-

rs!Buy= ctl.ItemData(varItem)

But it added the SKU number into the Buy field....which sort of makes sense. Not sure how I get it to copy across the Buy field from the material list...

Will see if I get any luck with the DLookup() function...

Thanks

Frank.
 
thats what i said - you need a way of identiifying a part of the ctl.itemdata - it will be structured according to the combo box.

but offhand I am not sure exactly what the correct syntax is.
 

Users who are viewing this thread

Back
Top Bottom