Subform Query

Robby19

Board Regular
Joined
Mar 19, 2018
Messages
227
Hello again!

I am trying to build a form that will show the User Permissions level, uSecurityID, based off a combo box (dropdown) selection.

I have a SubForm "sf_qry_UserPermissions," a Form "FrmUserPermissions," and a Query "QryUserPermissions".

The subform pulls from the query just like I want it to. My problem is getting a ComboBox on the SubForm to automatically update the results of the SubForm/Qry.

Help would be greatly appreciated!

For example, if 2 was selected in the combobox, it would show me this;
[TABLE="width: 500"]
<tbody>[TR]
[TD]uUserID[/TD]
[TD]uFirstName[/TD]
[TD]uLastName[/TD]
[TD]uEDIPI[/TD]
[TD]uRank[/TD]
[TD]uLastLogon[/TD]
[TD]uLogonCount[/TD]
[TD]uSecurityID[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]


And if 9 was selected in the combobox, it would show me this;
[TABLE="width: 500"]
<tbody>[TR]
[TD]uUserID[/TD]
[TD]uFirstName[/TD]
[TD]uLastName[/TD]
[TD]uEDIPI[/TD]
[TD]uRank[/TD]
[TD]uLastLogon[/TD]
[TD]uLogonCount[/TD]
[TD]uSecurityID[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]9[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Base the query on the value of the combobox?
On afterupdate of combo, requery the subform

Or link the subform to the combo and that will do it all for you.?
 
Upvote 0
In the query designer use Build for the criteria and then select form and control.
That will make it work only for that form then though.

The other way would be link combo to subnform. That way the query is not affected by any form controls?

In this pic I have a combo that selects all the records in a table that match in the Caller field.
Exactly what you a
re trying to achieve.
cbo%20linked%20subform_zpssnocxicj.png
[/URL][/IMG]

HTH
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top