Hello!
I am also a novice and found this thread. I completely follow what you are suggesting, pbaldy, and want the price to be part of the sales record, but do not know how exactly to do it.
My sales database is quite simple. I have a tblPriceChart that lists 8 items and their corresponding prices. 1 is $50, 2 is $40, 3 is $35 and so on. When number 1 is placed in the "Type" field of my order detailsI would like the unbound Price field to populate with the corresponding price from the tblPriceChart. The Type field is a Lookup which drops down a three column display with the Type number,Price,Discription field.
I have tried entering the following code in On Change in the Type field:
Private Sub Type_Change()
Price =DLookup("Price","tblPriceChart","ID=" & Type)
End Sub
This works great when I use the dropdown arrow to select a Type. But when I just want to key in the Type number (because I have it memorized) it gives me a Run-time error '3075': Syntax error (missing operator in query expression 'ID='.
How do I get this to accept a directly keyed in value and still have it lookup the price from the tblePriceChart? What Event or Code should I use to make this happen?
By the way, it is not absolutely necessary that I use the Lookup on the Type field, I just thought I would try to make it more user friendly for my helpers.
Thank you for any advise you may have.