How do I set the value of the textbox status to the field value of a query. After the selecting the value of the comboxbox, the textbox should show a field value of the query based on the selected product_code from the combobox. combo box uses another table to but product-code is the same in both data sources
Use DLookup :
=DLookup("[FieldName]","[QueryName]","[ProductCode] = " & [cboProductCode] & "")
If the code is text:
=DLookup("[FieldName]","[QueryName]","[ProductCode] = '" & [cboProductCode] & "'")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.