Jake Jake - 3 months ago 18
SQL Question

Link Textbox to Query Column

I have a query which has the following fields


Sum Of the Board Feet

Sum of the Board Price

What I am trying to do is populate a text box using the information in the above query specifically the Sum of the Board Feet

I am new to coding in VBA so researching I was unsure that I should be looking for. Help would be greatly appreciated


Most likely you would be better off using DSum in an expression for the textbox like:

=DSum("[NameOfYourFieldWithBoardPrice]","[YourOrderDetailsTable]","[OrderID]=" & [Forms]![FMain_Orders]![OrderID] & "")

or, if the textbox is on FMain Orders:

=DSum("[NameOfYourFieldWithBoardPrice]","[YourOrderDetailsTable]","[OrderID]=" & Me![OrderID] & "")