Guys I could use some help, I'm very new to Access and I'm trying to pull together some basic business applications.
I have a combo-box in a subform where I can select a Product, depending upon the Product selected I want 2 other fields in the Subform to be automatically updated with the correct valus associated with the product - the Product Reference, and the Products Buying Price.
I thought about using DLookUp to get the values from the Product Table, based upon the Product selected from the combo-box, however, how to I get the it to looup when the product changes or only when there is a value in the product field.
Yes You can use Dlookup
But I Wouldn't as you have the data haft there
Why not just use the combo-box
if you add the Columns you want to the combo-box and set the widths to 0 so you don't see them just add the columns to the query
then what you can do is in the afterupdate!combo-box
me.otherfeild = me.combo-box.Column(??)
?? where it is the Column number you want
But the To use a Dlookup
BlaBla = Dlookup("FEILDNAME","TABLENAME","WHAT")
WHAT = "[PRODUCTID]=" & me.combo ' for a number
WHAT = "[PRODUCTID]='" & me.combo & "'" ' for text
hope this help
See clear as mud
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Progaming environment: Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010 VB based on my own environment: vb6 sp5 ASP based on my own environment: 5.6 VB-NET based on my own environment started 2007 SQL-2005 based on my own environment started 2008 MYLE YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.