group query listbox - amend each record represented by grouped listbox item(s)

NBRJ

Registered User.
Local time
Today, 21:59
Joined
Feb 8, 2016
Messages
88
I have a listbox on a form that is based off a grouped query. For example:

Listbox: lstRequestedSoftwareAmalgamated
Query: qRequestedSoftwareAmalgamated, with the following fields grouped:

  • Title (group by)
  • Version (group by)
  • ConfigInfo (group by)
  • [other grouped fields...]
  • Locations (count of IDRequestDetail)
I then have some text boxes on the (unbound) form. When I select one or more items from the listbox, lstRequestedSoftwareAmalgamated, and then click a button (cmdDecision) I want to send the contents of these boxes to fields for each record in the group represented by the selected item(s) in the listbox.

How can I do this? When each selected listbox items represents just one record I can do that, but how do I get it to cycle though that group of records a selected line in the listbox represents.

So 1 list item could be:
Title: Illustrator
Version: 2016
ConfigInfo: [user config text here]
Locations: 20
And that would represent 20 records grouped.

So when they select that listbox item, I want the fields on the form to add data to field(s) for each 20 records.

I need this to be a listbox, because a user will be selecting more than one (grouped) item at a time to insert field data into.

Thanks for any pointers :)
 
Not clear on the goal, but either running an append query or opening a recordset, either way using SQL that used the fields being grouped on in the criteria. Using your example and pseudo-SQL:

SELECT...
FROM...
WHERE Title = Illustrator AND Version = 2016 AND ConfigInfo = [user config text here]

Obviously you'd have to build the SQL and concatenate the values from the listbox into the string.
 
ah-ha, I was just thinking about trying that, I'm glad I was on the right lines. I basically take the column data in the selected grouped list item, find the records that match that content and then append... I can pull in the FIDs of the fields and keep them hidden from the list and do it via that, so that's relatively easy, I'd think. Thank you!
 
No problem, post back if you get stuck.
 

Users who are viewing this thread

Back
Top Bottom