Hey, I am trying to display several "Customer Names" in a List Box that are in a "Customer Group" on a Continuous Form. But the form display Blank Data.
Kevin Robertson 2 months ago
Going to need more details. Screenshots may also be helpful.
James Hopkins 2 months ago
James Hopkins 2 months ago
James Hopkins 2 months ago
What is the best way to get the information displayed correctly.
I'd use a separate table instead, make a relationship then you can add a SubForm etc.
Kevin Yip 2 months ago
You don't have the customers' names in your table, so you'll have to link that info into your query. See the picture below as an example.
In query design, a multivalue field shows up as two fields: "Fieldname", and "Fieldname.Value". "Fieldname" is the entire multivalue field *in one row* (e.g. "3, 6"), while "Fieldname.Value" is all the values in *separate rows* (e.g. "3" and "6" in different rows).
You need to use the ".Value" field here, because you want all your different customers to show up in different rows in the list box.
In your case, you need to use ClientID.Value. Link this field to your customer table that has the customer names. Add that customer name field into the query. It should look something like my picture. Add a criteria to show only the names in the specified client group (e.g., =[Forms]![YourFormName]![ClientGroupID]). Put this query into the RowSource property of the list box. That should achieve your goal.
P.S. You can also use DLookup to look up customer names with ClientID.Value inside the query, without having to link to the customer table to get the names.
Kevin Yip 2 months ago
Kevin Yip 2 months ago
But as others have said, multivalue fields are frowned upon by many Access users, myself included. Even if you can solve this problem, you will surely run into other problems you can't solve due to multivalue fields.