Filter many fields on checkbox

D

dokter.cinta

i have good experience with vb
but i have some serious problems
i have created a mysql with table dss
but i`m confused about this
i think many people will see this problem in future
this is the table of dss

-----------------------------------------------------------------
Date | Drivers | Group | Speed | Score |
-----------------------------------------------------------------
01/01/2006 2111 north 64 98
02/01/2006 2121 north 53 95
03/01/2006 2145 north 43 96
04/01/2006 2187 south 77 94
05/01/2006 2133 north 35 92
06/01/2006 2165 south 38 100
07/01/2006 2181 north 38 80
08/01/2006 2135 north 42 60
09/01/2006 2111 north 43 44
10/01/2006 2124 south 41 85
11/01/2006 2113 north 45 82
12/01/2006 2109 north 75 96
13/01/2006 2106 north 75 99
14/01/2006 2111 north 75 87
15/01/2006 2123 south 90 56
--------------------------------------------------------


then i want select the date from 01/01/2006 until 10/01/2006 with
the driver is 2111 with group north and with speed from 24 until 90
with score from 50 until 100 and show it into datagrid
but i can selected any in checkbox and unselected to show what field i
just wanna filtered


i made date with dtpicker and drivers,group speed and score with
textbox
then i made selected field that i want to filtered with checkbox
this is the details
==================================
check1.value for date
check2.value for drivers
check3.value for group
check4.value for speed
check5.value for score
==================================
date1 = dtpicker1.value
date2 = dtpicker2.value
drivers = txtdrivers.text
group = cbogroups.text (combo box)
speed = txtspeed1.text and txtspeed2.text
score = txtscore1.text and txtscore2.text
==================================
this is a link the picture of the forms
http://www.geocities.com/joanleonz/forms.gif
please help me what kind of code what must i have


please help me? URGENT!


thanks
 
I

Immanuel Sibero

Hi Dokter Cinta (Orang Indonesia?)

I hope I'm understanding your question correctly...

Conceptually, one way to do this is to put a subform with datasheet view on
your main form. You would also put a command button on your main form that
says something like *submit*. The OnClick event of the command button would
do the following:
- Contain the code to construct a SQL string based on the selections the
user makes in response to the various textboxes
- This SQL string would then be set as the Record Source for the subform
- Perform a requery on the subform

Again, if I'm understanding you correctly, you want the user to control
which fields are showing in the result. This can be done but is this
functionality really a must? You only have a few fields to show anyway, what
do you gain by giving the user the option to choose which fields to show?

HTH,
Immanuel Sibero
 
D

dokter cinta

Hi Dokter Cinta (Orang Indonesia?) <=== ya bener hehehhee
yes... i have submit button to filter
but i dont know how
i has been try mysql on ms access but i want to do it with visualbasic
and its not show
:(
i`m so confused.... anybody can help me?
=======================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top