query from form by combo box

bigbigi

Registered User.
Local time
Yesterday, 16:02
Joined
Aug 3, 2007
Messages
17
my database got [FLAT] [FLOOR] [BUILDING NAME] [ ESTATE NAME]
how can i use a combo box to make a query in the sub- form so that
when i chose Estate name ,building name ,floor, flat, the sub- form will show the case that match
also
how can it show all the case match the estate if i chose the the building of
example i chose "A Estate" the whole "A Estate" will be shown

graceful for your help .
 
I decided that a demonstration may be easier than talking through this. Have a look at the attached example, hopefully you will find something useful.

Currently the filtered example requires you to make a full selection.

Use could use a modified copy of the qryAllFiltered criteria to get all the records for a particular estate. For example; remove the Building, Floor and Flat criteria that are based on the associated combos. Alternatively, take a look at frmMain, in which you can select an Estate and all of the associated records for that Estate are displayed.

If your db does not have a similiar relationship structure to the one in the example you probably need to rethink your structuring.

Note, this is all very rough and ready, so there may be various flaws in the it, but it should get you going in the right direction. The gaudy colouring in frmMain is for ease of observing the different subforms, I wouldn't normally choose such colouring.

HTH,

Tim
 

Attachments

Users who are viewing this thread

Back
Top Bottom