30. september 2003 - 15:58Der er
15 kommentarer og 1 løsning
2 filtere i samme formular
Jeg formular hvor jeg har en kode der filere ikke interesseret emner - Er det muligt at lave to af slagsen i samme formular altså en hvor jeg sortere afsluttet væk når ja/nej feltet er arktiveret samtidigt med, at jeg sortere ikke interesseret væk når jeg artivere denne??
Til ikke interesseret har jeg følgende kode:
Me.Filter = "interesseret = False" If Me.FilterOn = True Then Me.FilterOn = False Me.Kommandoknap213.Caption = "Fjern filter" Else Me.FilterOn = True Me.Kommandoknap213.Caption = "Filtrer kunder" End If
I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
Not quite sure I understand fully what you want to do but in answer to your question "Er det muligt at lave to af slagsen i samme formular" then the answer is yes
marai>I dont know if it is possible in YOUR dB but it should be possible.
In your "kunder" table, do you have two fields (yes/no maybe) one indicating that the kustomer is NOT interested (ikke interesseret), and another for closed (afsluttet)?
If you do then you need TWO check boxes on your form, one one "ikke interesseret" adnd the other for "afsluttet"
If you use buttons then this only selects one of the two options and if I understand you correctly you wnat to be able to select BOTH options at the same time! How can you do that with ONE button?????? Or one of TWO buttons! You can only click on one button at a time!!!!!!
If you do then you need TWO check boxes on your form, one one "ikke interesseret" adnd the other for "afsluttet" = If you do then you need TWO check boxes on your form, one for "ikke interesseret" and the other for "afsluttet"
maria>Its hard for me to give an alternative when I dont know much about your program. If you look at the example I sent, it changes the filter when you update one of the filter criteria. The more criteria you enter the fewer results are shown. Is this not what you want? Or am I missing something?
In your example 30/09-2003 16:35:13 you said there were 7 customers.
2 er = ikke interesseret and 3 er = afsluttet
If you place two checkboxes and ONE button on the form, these are to set the filter. One checkbox you check when you want to filter "ikke interesseret" and the othercheck box when you want to filter "afsluttet" you can check NONE, one, or BOTH checkboxes. Then press the button to make the filter.
Then you use the example I sent to see how I build a filter for one or more fields.
You have also to concider that when you check BOTH check boxes then there will be TWO values you have to compare! Is this to be a AND or an OR
SELECT count(*) from YourTable WHERE [ikke interesseret] = 1 OR [afsluttet] = 1 is NOT the same as SELECT count(*) from YourTable WHERE [ikke interesseret] = 1 AND [afsluttet] = 1
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.