none
Option Button

    Question

  • I have created a form that has a Begin_date and End_Date criteria

    I use the command button to get all the clients between begining and ending date.

    Now in the table frm_clients I have a field balanace. I created 2 option buttons on the form  >100,000 and <100,000...

    How should I code the command button in order to receive clients between begining date and End date (i know how to do that) but also based on the selection >100,000  and <100,000

     

    THANK YOU,

    B

    Saturday, February 11, 2006 7:14 PM

All replies

  • Hello

    See example:

    If IsNull(Frame1.Value) Then: msgbox "Please select a option": Exit Sub
    Select Case Frame1.Value
        Case 1
            DoCmd.OpenReport "rptCustomer", acViewPreview, , "[Date] BETWEEN #" & txtDateFrom & "# AND #" & txtDateTo & "# AND [Balance]>100000"
        Case 2
            DoCmd.OpenReport "rptCustomer", acViewPreview, , "[Date] BETWEEN #" & txtDateFrom & "# AND #" & txtDateTo & "# AND [Balance]<100000"
    End Select
    Thursday, October 08, 2009 5:11 AM