related combo boxes on a form

rhodes92

Registered User.
Local time
Today, 06:47
Joined
Jan 14, 2013
Messages
10
Hello all,

so I have a form that I have based one combo box on another one, basically I have a list of parts with part numbers and descriptions, when I put in the part number it brings in the description, all works well and I have no issues with that. The problem that I am having is that I want the form in datasheet view, when I do that I can select the part number in the first record and it will update the description in the first record but when I go to the second record and select a part number it clears the description from the first record. Now I know that the reason for this is because I put in an after update on the part number combo box to clear the description so that I can change the part number and it will update properly to the new description, what I dont know is is there another way to make this happen so that my description stays from record to record but will update if I change the part number?
 
I don't know that I followed your post. So let me give an anaolgy that I think highlights the issue.

You have a number of products. Each Product has a current Price. Customers buy Products (Orders). Suppose you have been selling these Products for 6 months. Now there is a Price change. What happens???

If you only store the Product Price in the Products table, then all of your historical Orders (Customer Purchases) will reflect the new Price!!! Not what you wanted...

So when you sell a Product, you record the quantity and the AgreedSellingPrice on the Order table. This allows the Product Price to be changed from time to time, and it allows you to have a discount for loyalty, clearance, volume discount etc.

Hope this helps.
 
Not exactly what I am looking for, but still a good analogy that I will implement as I need to set that up as well.

The code that I used for the combo box is this

Me.Description = Null
Me.Description.Requery
Me.Description = Me.Description.ItemData(0)

now I know that the Me.Description = Null is the line that resets the combo box description to a null value whenever I change the Part number combo box, and if this was a single record form it would work perfectly, but like I said, I would like this form to be in datasheet or continuous form view so that I can enter multiple parts on one ticket. I am not sure if there is a way to isolate the combo boxes from record to record on a single form like this. Not even sure that it is possible, would like to know though.
 

Users who are viewing this thread

Back
Top Bottom