|
-
Mar 7th, 2003, 12:54 AM
#1
Thread Starter
Addicted Member
Check whether Item is already in Datagrid??
Here's what I need to do....
I have a invoice form. It has a datagrid on it....
I have a label that I click which opens a "parts form"..
from the parts form you click the part you want to add to the invoice.. (this form displays the parts in a datagrid aswell)
But If the part already exsists in the invoice form datagrid..I dont want to add it again...but add 1 to the Qty of the exsisting part??
Thanks for the help in advance!!
-
Mar 7th, 2003, 11:53 AM
#2
Thread Starter
Addicted Member
Here is a little more info if this helps at all??
When I update the database is when the Invoice form closes....But I need to determine, if the part is already in the dataset when I click on the part I want to add from the parts form. The 2 datasets are not bound together.
So if I click on a part to add to the invoice....it just copies a string representation to the dataset of the invoice form
drCurrent = oldform9.mPartsNumber.NewRow()
drCurrent("PAR_NUMBER") = DataGrid1.Item(DataGrid1.CurrentCell.RowNumber, 0)
drCurrent("PAR_DISC") = DataGrid1.Item(DataGrid1.CurrentCell.RowNumber, 1)
drCurrent("PAR_LIST") = DataGrid1.Item(DataGrid1.CurrentCell.RowNumber, 3)
drCurrent("STOCK") = DataGrid1.Item(DataGrid1.CurrentCell.RowNumber, 2)
oldform9.mPartsNumber.Rows.Add(drCurrent)
I'm not sure the code to check if it already exists...so if you could give me an example that would be great....
And I've never worked with Stored Procedures....would it benifit me to do it that way??
Thanks again
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|