TheStriker
Programmer
Hi,
I have a subform that gets it data from the main form. The main form consists of a combo box that updates the subforms on the main form with matching UniqueID (nSiteID), along with other subforms. The other subforms updates with no problem after the user selects a nSiteCode from the combo box. This particular subform has a list box that also gets its values from the combo box on the main form via the code below.
SELECT 'MyFields' FROM 'MyQuery'
WHERE "[nSiteID]= " & [Forms]![New]![nSiteID]
This works fine as it updates the listbox with the appropriate records corresponding with the 'nSiteID' selected in the combo box from the main form. What I would like it to do is, when the user selects from the list box, the subform will update with the appropriate record, much like with the combo box on the main form. When I do it in the subform itself, it works fine because I created the ListBox with the wizard for that purpose, however when I open the main form that has that same subform, it will not update when the user selects a record from the ListBox. Any suggestions would be most appreciated.
Happy New Year!!
I have a subform that gets it data from the main form. The main form consists of a combo box that updates the subforms on the main form with matching UniqueID (nSiteID), along with other subforms. The other subforms updates with no problem after the user selects a nSiteCode from the combo box. This particular subform has a list box that also gets its values from the combo box on the main form via the code below.
SELECT 'MyFields' FROM 'MyQuery'
WHERE "[nSiteID]= " & [Forms]![New]![nSiteID]
This works fine as it updates the listbox with the appropriate records corresponding with the 'nSiteID' selected in the combo box from the main form. What I would like it to do is, when the user selects from the list box, the subform will update with the appropriate record, much like with the combo box on the main form. When I do it in the subform itself, it works fine because I created the ListBox with the wizard for that purpose, however when I open the main form that has that same subform, it will not update when the user selects a record from the ListBox. Any suggestions would be most appreciated.
Happy New Year!!