Recent content by arcticsponge

  1. A

    Use global variable as query criteria

    Oh dear, slipped up there. Interestingly, if I set the query criteria as: IN('Saloon','hatch') the query runs perfectly, but, if a prepare it to be passed as a variable, the query fails. key1()="hatch" works but key1() = "IN('hatch')" fails Any idea?
  2. A

    Use global variable as query criteria

    No equals sign; currently hardcoding the variable at source for test purposes so am referencing the the variable direct: Public Function key1() As String key1 = "IN('saloon','hatch')" 'key1 = strKey1 End Function also, the query: field: body table: tblItems Total: Group By Sort: Show...
  3. A

    Use global variable as query criteria

    If Me.Check3 = True Then strKey2 = "In('saloon','hatch','coupe')" Tried that but it didn't work, neither did "'saloon' OR 'hatch'"
  4. A

    Use global variable as query criteria

    Thanks David for your suggestion - the entry that has some bearing on my post is that of passing string in this instance strInvoice however, you are only passing one string through to the criteria eg "I0001" however, I would need the criteria to be something more along the lines of "I0001" OR...
  5. A

    Use global variable as query criteria

    To vbaInet: I am using a query so that I can add / remove or modify criteria at a later date (and to add a count function in if required); I am creating a table so as to ensure that the results are always available even if the form should be shut so as to prevent the user from needing to re-run...
  6. A

    Use global variable as query criteria

    Hi everyone. First, please accept my apologies if this has been posted in the wrong section. I am certain that there is a far more easier way to do this, I am open to suggestion but please humour me; its driving me potty! My database is used for vehicle lookups: main table: tblItems: fields...
  7. A

    DLookup locates records on top row only

    This seems to be working as well:
  8. A

    DLookup locates records on top row only

    I tried to enter a criteria but each time it would fall over with a 2001 "You Cancelled the previous operation" error . Can you tell me what my criteria should be.
  9. A

    DLookup locates records on top row only

    Hi All, I am using Dlookup to allow for user access using the popular "advapi32.dll" referenced as "fOSUsername" however, when I perform the lookup using fOSUsername or even a hard-coded reference, Dlookup only returns values from the first row. The code I am using is simple enough...
  10. A

    Simple Searches & forms

    Its not a subform that I am using rather its 3 separate forms - I tend to avoid sub forms like the plague. Rather than this search form functioning to locate records on the current form, I am using unbound form a (as home) unbound form b (as search results) and bound form c (as the user form...
  11. A

    Simple Searches & forms

    It would help wouldn't it. Basically, I have the forms and the table as described above however, as I am appalling with SQL, I cannot work out the code to take the textbox search string and look it up from the table / query and then display the results in a listbox on the second form which on...
  12. A

    Simple Searches & forms

    Hi All, This has probably been answered elsewhere but I cannot find it. I have 1 query & 3 forms. I am trying to perform user searches of the query, but my SQL is appalling. Basically, the first form acts as a homepage (in that it is always active); it has an unbound textbox (for the search...
Back
Top Bottom