Search results

  1. P

    Create new record with condition that it won't create duplicate

    Your help and a little more playing got the desired result. Remembering that this is a macro and not a module, I eventually put the following criteria in the macro: DCount("Customer_ID","tblCustomer","Customer_ID='" & [Filter_Customer_ID] & "'")=0 Thanks Stuart
  2. P

    Create new record with condition that it won't create duplicate

    I don't suppose that you could elaborate on that please? I was playing around with DCount without success using the following code (with many variations): DCount([customer_ID],"tblCustomer",[Customer_ID]=[Forms]![frmListCustomers]![Filter_Customer_ID])<>0 where Customer_ID is in the form...
  3. P

    Create new record with condition that it won't create duplicate

    I'm working on a database which uses a form to filter results from a table. The plan is to have three unallocated fields (filter fields) at the top of the form (in the header) and the corresponding fields from the table underneath. The user enters the details in the filter fields and the results...
  4. P

    VBA: Using a string as a field name

    I'll admit that I'm out of my depth with this (not a programmer, but needing to make use of some simple programming), but hope that this is an easy answer. I've got a sting variable that is the name of a field on my form. I want to be able to use this to retrieve the value from my form. In...
  5. P

    Self-made version of filter by selection - help

    Okay, that problem was fixed easily, but it's allowed me to discover what I suspect to be a much more difficult problem. When you apply a filter by form, it effectively writes a query with condition A AND condition B AND etc. When I run the ApplyFilter action from a macro, it seem to reset the...
  6. P

    Self-made version of filter by selection - help

    I knew that it would be something stupidly simple! The action does appear in macros, so the revised macro would be: Requery ApplyFilter where condition: [Field1]=[forms]![frmFilterTest]![FilterField1] ApplyFilter where condition: [Field2]=[forms]![frmFilterTest]![FilterField2] ApplyFilter...
  7. P

    Self-made version of filter by selection - help

    I'm helping out with a database at work and we have a need for a complex filter function. Due to our 'low-to-no tech' user base, the perfect solution (the built in 'filter by form' function) is neither obvious nor intuitive enough. The approach we want to take is something like this (very...
Back
Top Bottom