I have a database in which I want to track stock on hand. I have one table where I record purchases (Purchases Table), and this is linked to the Purchases Data Entry Form. Then I have another table where I record sales (Sales Table), and this is linked to the Sales Data Entry Form. Now in the sales form I created a field (Grandtotalbags), that uses the sum function to find the total of the quantity field - e.g. =Sum([Quantity])
In the Purchases form I have another field (TotalPurchases) that uses the sum function to find the total of the quantity purchased field - e.g. =Sum([QuantityPurchased])
Then I created a field (in the purchases form) that would have a calculation that would minus these two values and thus display the stock balance. I created the field (Stockbalance) and selected properties, and went to the expression builder in the control source. Then I selected the Purchases Data Entry Form and double clicked on the Quantity purchased field to add that to the expression. Then I selected the minus sign, after which I opened the forms folder, selected all forms, selected the sales data entry form, and from that double clicked on the Grandtotalbags field so that it was also added to the expression. However, when I open the form the stockbalance field has #Name? in it. It does not display the stockbalance. What am I doing wrong? Can anyone help me with this? Thanks in advance. Eagerly awaiting your replies.
In the Purchases form I have another field (TotalPurchases) that uses the sum function to find the total of the quantity purchased field - e.g. =Sum([QuantityPurchased])
Then I created a field (in the purchases form) that would have a calculation that would minus these two values and thus display the stock balance. I created the field (Stockbalance) and selected properties, and went to the expression builder in the control source. Then I selected the Purchases Data Entry Form and double clicked on the Quantity purchased field to add that to the expression. Then I selected the minus sign, after which I opened the forms folder, selected all forms, selected the sales data entry form, and from that double clicked on the Grandtotalbags field so that it was also added to the expression. However, when I open the form the stockbalance field has #Name? in it. It does not display the stockbalance. What am I doing wrong? Can anyone help me with this? Thanks in advance. Eagerly awaiting your replies.