Subform Filter

Beany

Registered User.
Local time
Today, 04:23
Joined
Nov 12, 2006
Messages
155
Hi,

Ive attached my database:

I have a main form called 'AssetMain'...

My table 'Asset' contains the important information...

In AssetMain i have a combobox (user). My intention is to click on a username and filter the details from table 'Asset' to the subform in the form 'Form1'. Can someone have a look at this?

And also can subform fields have dropdown lists?

thanks
 

Attachments

1) You don't need a MainForm for this.
2) Open a subform as single, and use FILTER BY FORM icon.
 
you're correct....but i would prefer to have a main form.

Can i not use something similar to filter by form on the Main Form?
 
Last edited:
Change Form1 Data source

Hi,

I have changed it to filter by "User" only but if you have a look you will get the idea.
 

Attachments

Thank you Zigzag...

I can see that youve included an open button in ASSETMAIN form...which is good but is it possible to choose a user and it automatically opens Form1 (contains subform)???

cheers
 
Yep... Thats not a problem, take the code from the button and place it in the "on Change" event of the Combo Box. However that would then restrict you to only being able to filter "users". If you placed the subform on the main form you could get the "On change" event to requery the subform.
 
Excellent i copied the button code and placed it in the On Change event for the combobox, and it works...

I didnt really understand what you meant by:

"However that would then restrict you to only being able to filter "users". If you placed the subform on the main form you could get the "On change" event to requery the subform. "

requery? what does this do? and how do i requery it?

thanks mate
 
Filter Subform

After you have selected a User , Form1 will open before you have a chance to select Department or Site.
Have a look at the attachment, it has the subform on the main form.
 

Attachments

Right...

Ive had a look at the attachment and i understand what you mean.. but i prefer it the other way.... this is because on the main page i have three different ways of searching for info... user, department and site... does that make sense??!!!

On form1 (includes subform) can i add a field that counts and displays how many records each user has?
 
anyone?

Any Help would be appreciated

Thanks
 
Sorry Beany,

I'm caught up with a few things at the moment, if you still need help in a couple of days I will get back to you.
But I'm sure someone will pick this up and help you by then.
 
Hi,

Ive attached my database:

I have a main form called 'AssetMain'...

My table 'Asset' contains the important information...

In AssetMain i have a combobox (user). My intention is to click on a username and filter the details from table 'Asset' to the subform in the form 'Form1'. Can someone have a look at this?

And also can subform fields have dropdown lists?

thanks

Find attached a working copy of what I think you wanted. It will filter by one OR ALL of the combo boxes. Right now you don't have enough data where filtering by all will generate anything but it does do it.
 

Attachments

Boblarson, thank you very much..


It looks so much better....

If i wanted to add a report button for each user, department or site (location), how would you advise me to approach this?

What i want is for a report button to appear for my selections and i can print a report just for that selection?

any ideas?

once again, thank you so far
 

Users who are viewing this thread

Back
Top Bottom