Cascading Combo Box Parameter

L'apprentis

Redcifer
Local time
Yesterday, 22:13
Joined
Jun 22, 2005
Messages
177
I have an unbound Form with a Subform bound to a query. The query parameters are selected by the users via Unbound cboboxes. The form is working but I would like to add a feature on each cbobox that would allow to show "All" the data (ie:Show the data like if there was no parameter on that field). I can't see how to add this feature, is anybody got any idea?
 
Combo box select all or some.

There is an example here that may offer the functionality you require.


This is a very old sample, which I did when I insisted on putting "let" at the beginning of my statements, Just to be different and to wind up Charlotte.

So in the following code in the module:

Private Sub fSetVar()
Let gvCust = cboMupCustGrp
Let gvLorry = cboMupLorry
Let gvMatl = cboMupMatlGrp
frameSfrmMup.Requery
Me.Requery
End Sub

you should remove all of the "let" words To make the code compliant with the latest ideas.
 
Thanks

Hi Gizmo,
Thanks for your code it's really helpfull, I think I managed to make it work but there is still some point that I don't totally understand, what is the function of (*) in a query.
Why do we use the SQl "LIKE" with the functions in the criteria of the SfrmQuery?
This method is working but if the function is applied on a field with Null values, all the corresponding records are not shown anymore.
 
I am not sure my explanation is really clear, but here is a more precise example:
Tbl1
FldX
FldPipeID

Tbl2
FldPipeID
FldPipeSize


Query shows all the record from Tbl1 and the Field FldPipeSise from Tbl2
*Join property are set up to show all the record from Tbl1
*Tbl1 & tbl2 are Linked by FldPipeSize
*FldPipeID can be blank in Tbl1

When the Criteria is applied (Like fct....()) on the criteria of the Field FldPipeSize, all the record from Tbl1 with a null PipeID are not shown?
 

Users who are viewing this thread

Back
Top Bottom