title: Populate a Textbox in Access 2016 from Combobox and Listbox Selection
body: <p>I have a form with a combobox that allows user to select a single company. When they select the company, a listbox is populated with a list of groups for that company. When the user selects a group in the listbox, I want to populate one textbox with the MAX(Order_Date) from a table where the CustomerID field is equal to the cboCustomers selected value and the [Nat'l Accounts] field is equal to the selected group from the listbox. I just basically want this query result to populate a textbox.</p>
  <pre><code>    select MAX([Quote Date])
      from quotes 
      where customerid=cboCustomers 
      and [Nat'l Accounts]=cboNationalAccounts
  </code></pre>
  <p>Below is my control source query on the textbox.</p>
  <pre><code>=DLookUp(Max([Quote Date]),[Quotes],[Quotes]![CustomerID]=[cboCustomers] &amp; [Quotes]![Nat'l Accounts]=[cboNatlAccounts])
  </code></pre>
  <p>In the after update event of the listbox, I have</p>
  <pre><code>    Private Sub cboNatlAccounts_AfterUpdate()
          QuoteDate_Textbox.Visible = True
          QuoteDate_Label.Visible = True
          QuoteDate_Textbox.Requery
      End Sub
  </code></pre>
  <p>When I run the form, the listbox populates successfully. When I select a record in the listbox the two controls (label &amp; textbox) do become visible, but the textbox shows #Name?.</p>
  <p>How do I populate a textbox with the max date for the company and group?</p>