G
Guest
I have the ORDERFORM opened and its underlying table is ORDERTABLE. ORDERTABLE has a primary key named ORDER, a currency field named PRICE, and a number field named SKU_ID
The PRODUCT table key field is SKU_ID. There is a one to many relationship between PRODUCT/SKU_ID and ORDERFORM/SKU_ID.
PRODUCT also has a field named PRICE. I don't envision that SKU_ID is a real world entity that will be utilized as gospel, so I want to store the price that the order was sold in the ORDERTABLE as well as the PRODUCT TABLE, because if the PRODUCT TABLE GOES unpopulated, then the user can just type a price into the textbox of ORDERFORM. In other words, the PRICE could be obtained from PRODUCTTABLE or just manually entered
ORDERFORM has a listbox named LISTPRODUCTDATA which gets its data from PRODUCT. If the user clicks a different record in the list box LISTPRODUCTDATA , the value displayed in the text box whose source is SKU_ID(ORDERFORM) changes immediately, I suppose because there is a relationship between the tables and SKU_ID is a primary key in PRODUCT. The value stored in the table ORDERTABLE(SKU_ID) automatically changes to the same value in PRODUCT(SKU_ID)
However, the list box also displays the non key field called PRICE. ORDERFORM has a textbox for it's PRICE, as I said already. I want the value displayed in
the ORDERFORM textbox "PRICE" to change automatically if the user clicks a different product in LISTPRODUCTDATA and be set to the non key value of PRICE in the PRODUCTTABLE
I tried using
Private Sub Listproductdata_Click(
setvalu
End Su
sub setvalu
forms!ORDERFORM!price = 9
En
and the price textbox for ORDERFORM(price) does change to 99 but only after I click on that textbox...not automatically
If I replace 99 with forms!ORDERFORM!listproductdata.itemdata(4) nothing changes
I tried DIRTY() and it didn't work
I obviously don't have a grasp of what's really going on
What do I do and what is really happening...How is it really working?
The PRODUCT table key field is SKU_ID. There is a one to many relationship between PRODUCT/SKU_ID and ORDERFORM/SKU_ID.
PRODUCT also has a field named PRICE. I don't envision that SKU_ID is a real world entity that will be utilized as gospel, so I want to store the price that the order was sold in the ORDERTABLE as well as the PRODUCT TABLE, because if the PRODUCT TABLE GOES unpopulated, then the user can just type a price into the textbox of ORDERFORM. In other words, the PRICE could be obtained from PRODUCTTABLE or just manually entered
ORDERFORM has a listbox named LISTPRODUCTDATA which gets its data from PRODUCT. If the user clicks a different record in the list box LISTPRODUCTDATA , the value displayed in the text box whose source is SKU_ID(ORDERFORM) changes immediately, I suppose because there is a relationship between the tables and SKU_ID is a primary key in PRODUCT. The value stored in the table ORDERTABLE(SKU_ID) automatically changes to the same value in PRODUCT(SKU_ID)
However, the list box also displays the non key field called PRICE. ORDERFORM has a textbox for it's PRICE, as I said already. I want the value displayed in
the ORDERFORM textbox "PRICE" to change automatically if the user clicks a different product in LISTPRODUCTDATA and be set to the non key value of PRICE in the PRODUCTTABLE
I tried using
Private Sub Listproductdata_Click(
setvalu
End Su
sub setvalu
forms!ORDERFORM!price = 9
En
and the price textbox for ORDERFORM(price) does change to 99 but only after I click on that textbox...not automatically
If I replace 99 with forms!ORDERFORM!listproductdata.itemdata(4) nothing changes
I tried DIRTY() and it didn't work
I obviously don't have a grasp of what's really going on
What do I do and what is really happening...How is it really working?