Wie hinzufügen von Funktionalität, die für die ComboBox <Select> in Microsoft Access-Formulare

Also ich habe eine Frage den anderen Tag über ein access-Formular, das benötigt wird, um eine "Select All" - option Hinzugefügt 2 ComoBoxes. Ich war in der Lage, die in der option, um die 2 von Ihnen mit einem union. Doch die Optionen haben nichts noch. Ich fand die Abfrage, die dem form-Parameter aus der ComboBox und dies ist, wo ich brauche, um in die option alle wählen, es sei denn, nach starrte es stundenlang habe ich keine Ahnung, wieder.

Die Datenbank war nicht von mir geschrieben, es ist etwa 10 Jahre alt und wurde gegeben, um mich zu fügen Sie einige neue features. Ich habe das getan, und der Besitzer beschwerte sich, dass die Schaltfläche "Alle Auswählen" buttons, die noch nie gearbeitet haben. Nach der Forschung haben die Tasten VB-script, löscht das Kombinationsfeld Eingang negiert Wert. Ich bin der Planung über die Verschrottung von denen, die jetzt, da ich die option Hinzugefügt, um die ComboBox selbst.

Die SQL-Abfrage, liest combo-input sieht wie folgt aus:

PARAMETERS [Forms]![ReportCentre]![cboTreatmentType] Short, [Forms]![ReportCentre]!      [cboTreatmentDate] Short;


SELECT addresses.*,
       [firstname] & "" & [lastname]
       AS Name,
       [street] & "," & [suburb] & "" & [stateorprovince] & "" & [postalcode]
       AS
       Address
FROM   addresses
WHERE  ( ( ( addresses.treatmentid ) = [forms] ! [reportcentre] !
                                                [cbotreatmenttype].[Value] )
         AND ( ( addresses.treatmentdate ) = [forms] ! [reportcentre] !
                                                 [cbotreatmentdate].[Value] )
         AND ( ( addresses.birthmonth ) LIKE [forms] ! [reportcentre] !
                                             [txtbirthmonth].[Value]
                                                 & "*" ) )
        OR ( ( ( addresses.treatmentid ) IS NULL )
             AND
       ( ( addresses.treatmentdate ) = [forms] ! [reportcentre] !
                                           [cbotreatmentdate].[Value] )
             AND ( ( addresses.birthmonth ) LIKE [forms] ! [reportcentre] !
                                                 [txtbirthmonth].[Value]
                                                     & "*" ) )
        OR ( ( ( addresses.treatmentid ) = [forms] ! [reportcentre] !
                                                 [cbotreatmenttype].[Value] )
             AND ( ( addresses.treatmentdate ) IS NULL )
             AND ( ( addresses.birthmonth ) LIKE [forms] ! [reportcentre] !
                                                 [txtbirthmonth].[Value]
                                                     & "*" ) )
        OR ( ( ( addresses.treatmentid ) IS NULL )
             AND ( ( addresses.treatmentdate ) IS NULL )
             AND ( ( addresses.birthmonth ) LIKE [forms] ! [reportcentre] !
                                                 [txtbirthmonth].[Value]
                                                     & "*" ) )
        OR ( ( ( addresses.treatmentid ) IS NULL )
             AND
       ( ( addresses.treatmentdate ) = [forms] ! [reportcentre] !
                                           [cbotreatmentdate].[Value] )
             AND ( ( addresses.birthmonth ) IS NULL ) )
        OR ( ( ( addresses.treatmentid ) = [forms] ! [reportcentre] !
                                                 [cbotreatmenttype].[Value] )
             AND ( ( addresses.treatmentdate ) IS NULL )
             AND ( ( addresses.birthmonth ) IS NULL ) )
        OR ( ( ( addresses.treatmentid ) = [forms] ! [reportcentre] !
                                                 [cbotreatmenttype].[Value] )
             AND
       ( ( addresses.treatmentdate ) = [forms] ! [reportcentre] !
                                           [cbotreatmentdate].[Value] )
             AND ( ( addresses.birthmonth ) IS NULL ) ); 

Ich weiß, es ist chaotisch und schwer zu verstehen, deshalb bin ich ja auch um Hilfe zu bitten. Wie Schaffe ich es, dass zur Validierung eine "Select All" - option für die beiden ComboBoxes?

InformationsquelleAutor amartin94 | 2013-01-24

Schreibe einen Kommentar