Filter query results by form

Leffe78

Registered User.
Local time
Today, 22:30
Joined
Oct 15, 2004
Messages
19
Hi everybody!

I have tried to search through this forum and find a solution to my problem, but so far to no good.
My problem is this:
I have two forms, in the first the users can select a number of properties to search in a database of employees. They can search by EmploymentID, surname, lastname, yeah some_more_goodies_here. Either way, the problem arises when i want the other form to be filtered by these properties.

At the start, the other form is not filtered at all, it shows all employees plain and simple... this works fine, its source is a query which simply lists all the employees without a WHERE clause. When properties has been selected in the first form, i would like it to simply update the other form.. not by a popup of it. I have tried a number of ways but always got stuck by some wierd errormessage.
For example: Creating and concatenating strings to form a SQL question from the textboxes, trying to apply a filter and requery the subform.

Do someone have a crystal clear path how to arrange this kind of functionallity or am i out in seriously deep water here?
What do you guys recommend?
 
:rolleyes: Hello Leffe78!
I suggest, make your "other form" as
a subform of the "first form".
 
Yes, i have done that.
Im a newbie on Access... so i guess there are some implicit solutions presenting itself when you say that.
Do you mean the possibility to link childfields and masterfields?
That is not possible when the forms source is from a query. (At least that is what Access tells me over and over :) )

Any other suggestions would be appreciated.. or if you want to give me more hints Stef :)
 
:confused: Hello Leffe78!
Why not! You can link childfields and masterfields
i despite of the subroms source is a query.
Look at "DemoSFormA97.mdb.
 

Attachments

Štef said:
:confused: Hello Leffe78!
Why not! You can link childfields and masterfields
i despite of the subroms source is a query.
Look at "DemoSFormA97.mdb.

hi Štef!

Well, yes i saw that they were connected in a nice manner in that file but i can´t connect my forms, is says "cant connect unbound forms". Im' not a vet in this program so i honestly dont know how to do this. The subform is truly a subform as it says "Subform/Subreport: NameOFSubForm " in the statusfield when i look at its properties.

How do you connect them explicitly? They are done using wizards.. is this the problem?
 
Ok, managed to kill the problem :D

I simply did some more work in the VBS code. Where i updated the filters in the subform... my problem is that the syntax of VBS is very confusing sometimes, im used to C and alike.

Anyway thanks for the help Stef
 

Users who are viewing this thread

Back
Top Bottom