Subform with criteria

dubiic

Registered User.
Local time
Today, 19:22
Joined
Apr 3, 2008
Messages
30
Hello again!

This time I have to make subform based on query, but I am interested in just these values where field value meets with one of my form fields. Idea is that I cant make separate qbf, but I have to implement it in my form. No idea how can I achieve it. Maybe you can suggest right approach.
Plus I somehow need to get subtotal result which sums all filtered fields showed in my subform.

Thanks a lot in advance!
 
The query underlying the subform can refer to the main form for the criteria.

Or, you can set the subform's filter property at any time to display only those records you want to. Plus the benefit of that is that calculations, such as the Sum, will show only the totals for the filtered form.
 
Hmm I was about to try it, but when I inserted my subform in main form, I'm getting error message about "unable to communicate with Ole/ActiveX" and even when I deleted subform, main form becomes unusable and i'm getting the same error message on every button click :(

edit: i managed to copy form, deleted old bugged one, and renamed new one to right name. worked fine till i inserted subform - got same Ole/activex error. Then I tried to do the same copy thing and now I am getting "Error accessing file. Network connection may have been lost" whatever I am doing - seems like a good day to die.
edit2: I red about my last error and fixed it with using these methods http://www.access-programmers.co.uk/forums/showthread.php?t=87027&highlight=Error+accessing+file

Ole/activeX still is issue tho.
 
Last edited:
Sounds like you have corruption going on. Try importing everything into a new, blank mdb file.
 
Did like you said and everything seems to work normally now :)
I made that sum formula in my subform footer, but when I am trying to get it out on main form using just ordinary textbox im getting #Name?.
But rest is great, thank you a lot!
Found my mistake about textbox aswell.
Nice! Thanks a lot for support.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom