Grouping with information from multivalue fields

Hagridore

Agent of Creation
Local time
Today, 10:31
Joined
Feb 3, 2015
Messages
55
Greetings Greater Gurus! I have a table which now contains a couple of hundred records with more than thirty fields each, and will ultimately contain over 1000 records. Some of these fields use the multiple value feature, and the fields and the forms which fill them work beautifully. Now comes the challenge.

Without going into detail that I'm not at liberty to share, I can say that there are different offices which have different people who are responsible in different ways for the work covered in these records. It is possible for each record to have multiple people assigned to it from the same office. This requires setting the control that shows the people from each office to allow multiple values. I need to be able to create a report which will allow me to hand a list of all the records each person is responsible for in the office to the person responsible, in spite of the fact that this will mean records will show up on more than one person's report.

Before I knew that there might be multiple people in the office for each record, I created great reports grouping and ordering by this office's control and field. Now, since they allow and store multiple values, I can't use them any more. I need to be able, as I said above, to get the same effect. I think the answer lies in some sort of calculated field or formula that applies text filters. What I need to be able to do is look in the field for this office and see if a person's name is contained in the field for that particular record, regardless of who else might be in the field, too. I need to be able to use the results from this filter or calculation or formula to generate something I can use in the group and order by processes. Can anyone help?
 
to look for a specific chosen option within a multivalue field you use

myMultiValueField.Value=X

But here is a classic case where you should not use such a field - what happens if someone new joins or someone leaves?
 
I have a table set from which the people's names are added to the multivalued field, which will just populate the control to keep up with any new additions. However I can see where doing this by having to specify the specific "X" would be a bit of a pain. Is there a way to make the code you indicated look at that table and run a report page for each person in the table? I can see that I could probably use this as a basis for a parameter query and base a report on that, but is there a way, like an Excel V-or-HLookup table, to get the report to go down the table one by one?
 
Not quite sure what you are asking - you would need to use vba to open a recordset which includes the myMultiValueField.Value as a returned column and then loop through the recordset, run the report then move to the next record.

if you are looping through the source table then you would need to link the sourcetable ID to the value in myMultiValueField.Value

You might find this link useful in understanding multivalue fields

https://support.office.microsoft.co...5ee-9846-26e2efd5a4d6&ui=en-US&rs=en-GB&ad=GB
 
CJ has already suggested that MVFs are not appropriate here. MVFs are ok if you are never actually going to use or manipulate the data in the field - even then I would be reluctant to use them. They are inherently difficult to work with in this respect (not impossible as CJ has provided info on how). They are also non-standard in terms of SQL. Much better to redesign your database right now to have a separate table to hold the people and link this to your main table. By doing this your reporting problem becomes trivial.

You'll need to extract the MVF data to the table to accomplish the redesign.
 
CJ_London, thank you so much for your included link with information about Multivalue fields. It turns out the answer for the rest of my queries was in the information at that link, and the solution is laughably simple. Instead of using the actual field name of multivalue fields in group and sort fields, use the field name.value. This shows up as soon as one designates the field as multivalued, and can be selected in the field list as one is creating command buttons, etc. It works like a charm! :)

I'd do a Thanks through the system, but it appears this capability is only available in some situations. Thanks again!!!!
 
and the solution is laughably simple. Instead of using the actual field name of multivalue fields in group and sort fields, use the field name.value
Yes - as explained in my initial post
 
Guess I was sleeping when I read your response. Sorry about that. You are right.
 

Users who are viewing this thread

Back
Top Bottom