[AccessD] select more then one

Pedro Janssen pedro at plex.nl
Sat Jul 26 09:21:37 CDT 2003


Hello Group,

with the code below i get as result: One  Produktcode,  One number and  One price depending on which checkboxProduktcode is selected.

Is there a way to change this code so that i could select more then one checkboxProduktcode (still only one of the chbA1, chbA2, chbA3 or chbUitz1can be selected) and that the outcome would be the selected produktcodes with there numbers and prices

TIA

Pedro Janssen





Dim strNumber as String
Dim bolFound as Boolean

bolFound = False
If chbProductCode1 = true then
    strNumber = "1"
    bolFound = True
ElseIf chbProductCode2 = true then
    strNumber = "2"
    bolFound = True
ElseIf chbProductCode3 = true then
    strNumber = "3"
    bolFound = True
ElseIf chbProductCode4 = true then
    strNumber = "4"
    bolFound = True
ElseIf chbProductCode5 = true then
    strNumber = "5"
    bolFound = True

EndIf

If bolFound = True then
    .Item("ProductCode" & strNumber).Value = Nz(Me("txtProductCode" & _
        strNumber))
    .Item("Number" & strNumber).Value = Nz(Me![txtNumber])
    
    If chbA1 = True then
        .Item("Price" & strNumber).Value = Nz(Me("txt" & _
            strNumber & "c16"))
    ElseIf chbA2 = True then
        .Item("Price" & strNumber).Value = Nz(Me("txt" & _
            strNumber & "c17"))
    ElseIf chbA3 = True then
        .Item("Price" & strNumber).Value = Nz(Me("txt" & _
            strNumber & "c18"))
    ElseIf chbUitz1 = True then
        .Item("Number" & strNumber).Value = Nz(Me("txtUitz" & _
            strNumber & "Number"))
        .Item("Price" & strNumber).Value = Nz(Me("txtUitz" & _
            strNumber & "Price"))
    End If
End If

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030726/bef6372e/attachment.html>


More information about the AccessD mailing list