So it looks like this:
tbl_SALESRECEIPT:
SALES_ITEM_ID (PK)
frm_SALESRECEIPT:
record source = tbl_SALESRECEIPT
This is the "master form". Not really important here, but just giving everyone and idea of what's going on.
tbl_TRANSACTION:
TRANSACTION_ID (PK)
SALES_RECEIPT_ID (FK)
SALES_ITEM_ID (FK)
sub_TRANSACTION:
record source = tbl_TRANSACTION
linked using SALES_RECEIPT_ID (MASTER / CHILD fields)
This form is where users input sales items onto the receipt.
tbl_SALESITEMS:
SALES_ITEM_ID (PK)
...other info
SALES_PRICE
sub_SALESPRICE:
record source = tbl_SALESITEMS
linked to sub_TRANSACTION using SALES_ITEM_ID
This form is in/on sub_TRANSACTION and is there to pull the price from tbl_SALESITEMS. It has a textbox txt_SALES_PRICE thats control is SALES_PRICE on the tbl_SALESITEMS
frm_TRANSACTION has a combobox cmb_SALES_ITEM on it thats record source is tbl_SALESITEMS (bound column = SALES_ITEM_ID) and has SALES_ITEM_ID as its control. This allows users to enter items onto the receipt using this combobox.
2 ?'s
1) When I open the Form or switch records, txt_SALE_PRICE on sub_SALESPRICE is updated to the appropriate price for the SALES_ITEM shown in cmb_SALES_ITEM. But when I change the value of cmb_SALES_ITEM, nothing happens in txt_SALES_PRICE on the sub_SALE_PRICE form. Why? When I change cmb_SALES_ITEM and the switch records, and then switch back, it is updated. What is going on here?
2) If anyone has any brilliant ideas on how to sum up all of my SalesItems and their quantities (QUANTITY is on the frm_TRANSACTION / tbl_TRANSACTION and SALES_PRICE is on sub_SALES_PRICE / tbl_SALESITEMS) I will love you. I have been trying forever and I can't get it to work. I am referencing the controls properly (FORMS!Master_Form![Name_of_subform_control].Form!txt/cmb/lstbox), but I cant seem to get anything other than an #error. I want to have a control on my main form that gives the total SUM([QUANTITY*SALESPRICE]) for each record. Any ideas?
Sorry this post is ridiculously long. I am still new to the forum so if I am pissing off anyone with these long , perhaps overly detailed descriptions of what I am trying to do, please let me know
That said, everyone is great on here and thanks for the help in advance!
MR_G
tbl_SALESRECEIPT:
SALES_ITEM_ID (PK)
frm_SALESRECEIPT:
record source = tbl_SALESRECEIPT
This is the "master form". Not really important here, but just giving everyone and idea of what's going on.
tbl_TRANSACTION:
TRANSACTION_ID (PK)
SALES_RECEIPT_ID (FK)
SALES_ITEM_ID (FK)
sub_TRANSACTION:
record source = tbl_TRANSACTION
linked using SALES_RECEIPT_ID (MASTER / CHILD fields)
This form is where users input sales items onto the receipt.
tbl_SALESITEMS:
SALES_ITEM_ID (PK)
...other info
SALES_PRICE
sub_SALESPRICE:
record source = tbl_SALESITEMS
linked to sub_TRANSACTION using SALES_ITEM_ID
This form is in/on sub_TRANSACTION and is there to pull the price from tbl_SALESITEMS. It has a textbox txt_SALES_PRICE thats control is SALES_PRICE on the tbl_SALESITEMS
frm_TRANSACTION has a combobox cmb_SALES_ITEM on it thats record source is tbl_SALESITEMS (bound column = SALES_ITEM_ID) and has SALES_ITEM_ID as its control. This allows users to enter items onto the receipt using this combobox.
2 ?'s
1) When I open the Form or switch records, txt_SALE_PRICE on sub_SALESPRICE is updated to the appropriate price for the SALES_ITEM shown in cmb_SALES_ITEM. But when I change the value of cmb_SALES_ITEM, nothing happens in txt_SALES_PRICE on the sub_SALE_PRICE form. Why? When I change cmb_SALES_ITEM and the switch records, and then switch back, it is updated. What is going on here?
2) If anyone has any brilliant ideas on how to sum up all of my SalesItems and their quantities (QUANTITY is on the frm_TRANSACTION / tbl_TRANSACTION and SALES_PRICE is on sub_SALES_PRICE / tbl_SALESITEMS) I will love you. I have been trying forever and I can't get it to work. I am referencing the controls properly (FORMS!Master_Form![Name_of_subform_control].Form!txt/cmb/lstbox), but I cant seem to get anything other than an #error. I want to have a control on my main form that gives the total SUM([QUANTITY*SALESPRICE]) for each record. Any ideas?
Sorry this post is ridiculously long. I am still new to the forum so if I am pissing off anyone with these long , perhaps overly detailed descriptions of what I am trying to do, please let me know
That said, everyone is great on here and thanks for the help in advance!
MR_G