Search results

  1. D

    How to combine filters in VBA

    Hi all I've a form which has four dropdown boxes. Based on the combination of the selection in those 4 fields, I want a combined filter to work. You can easily use an AND statement to combine the filters but you end up with issues if one of the dropdown fields is left empty as the filter will...
  2. D

    Define in VBA on which field to filter

    Hi Gasman yes your suggestion works and I've got my solution now! Great! Took me couple hours for probably something easy for a specialist but I'm learning! Me happy! Thanks man! Erik
  3. D

    Define in VBA on which field to filter

    Hi again, I got a little step further I think. I ran following Dim strSQL As String strSQL = "SELECT * FROM availability_form WHERE " & Me.Select_Availability2 & "" & ">0.2""" DoCmd.ApplyFilter strSQL But it gave following error: Syntax error in string in query expression '[Month 1]>0.2"" It...
  4. D

    Define in VBA on which field to filter

    ah and the record source is a table called "RAT availability"
  5. D

    Define in VBA on which field to filter

    sorry to disappoint you but I don't know how to do that. Is that just putting that debug.print me.filter statement at the end of the code? If so, I did that but nothing happens when I run the code....:banghead:
  6. D

    Define in VBA on which field to filter

    yes it is on the same form. I used the code and it does not give an error but also doesn't filter as expected. The variables are defined as Number fields so that could not be the issue. If I test the filter in a query it perfectly filters on values >0.2..... not sure what could be the problem...
  7. D

    Define in VBA on which field to filter

    Thanks theDBGuy for your quick response... I'm just an amateur in this but learning quick. :-) Just to further clarify, the value they select from the dropdownfield on the form is stored in the unbound field called "Select_Month".... the value in this field will contain the name of the variable...
  8. D

    Define in VBA on which field to filter

    HI all, a form contains records with 12 variables for each month of the year. Based on a dropdown list filter on the form header, I want to define on which month the user wants to filter. So if the user selects march from the drop down, the records on the form should be filtered on the variable...
Top Bottom