Search is disabled, so I'm posting this question:
I want to display data in a text field on a form based on a selection in a combo box. I get it to work with a list box, but not with a text box. Here's what I have:
Form name: frm_OfficeReport
ComboBox: cbffice; TextBox: txt_officevalue
cbffice is populated from a Group By in a query called qry_OfficeCreate
txt_officevalue should use cbffice to populate from a query called Office Value (contains two columns: office and a sum expression named Sum$)
In cbffice_AfterUpdate, I add:
txt_officevalue = DLookup("[Sum$]", "Office Value", "Office =" & Forms!frm_OfficeReport!cbffice)
This doesn't work, but I think it's the syntax of dlookup. Thanks in advance for the help.
I want to display data in a text field on a form based on a selection in a combo box. I get it to work with a list box, but not with a text box. Here's what I have:
Form name: frm_OfficeReport
ComboBox: cbffice; TextBox: txt_officevalue
cbffice is populated from a Group By in a query called qry_OfficeCreate
txt_officevalue should use cbffice to populate from a query called Office Value (contains two columns: office and a sum expression named Sum$)
In cbffice_AfterUpdate, I add:
txt_officevalue = DLookup("[Sum$]", "Office Value", "Office =" & Forms!frm_OfficeReport!cbffice)
This doesn't work, but I think it's the syntax of dlookup. Thanks in advance for the help.