Search results

  1. T

    Report filtered by form / combo boxes

    cheers data, what you've suggested works but only when nothing is selected in the combo box, whenever I select one of the list all I see in the report is the IIF statement?
  2. T

    Report filtered by form / combo boxes

    Hi all, I have a report working and it can be filtered based on what is selected within the combo boxes on a form. When nothing is selected from the combo boxes, all results are returned and when a selection is made from any of the combo boxes only those values return. Excelent! The search...
  3. T

    Switch statement restrictions?

    not sure what was happening, I tried to quit VB when I got the compile error, and was propmted about stopping debugging and after doing that for each returned record, the query just showed it as #Error again? I've double checked all the data and there's nothing wrong with it as far as I can...
  4. T

    Switch statement restrictions?

    most odd, When I included that into the query I and run it I get this error: Compile error: Only comments may appear after End Sub, End Function, End Property It opens the module and highlights the first if line RiskBand
  5. T

    Add Data Using Query

    hi Adam not sure what you're trying to do is possible, one of the more advanced db developers here may. I was wondering however why you would want to do this?
  6. T

    Switch statement restrictions?

    cheers ken, I was trying to get the other one to work but getting errors and could see part of it was around the Between part so nice one. The code appears to be working ok, I'm not getting any compile errors but when I run the query I get #Error in all the fields. I'm guessing it's the way I...
  7. T

    Switch statement restrictions?

    Thanks Ken, It's crazy how these things go round in circles, or is that just my head? (http://www.access-programmers.co.uk/forums/showthread.php?t=81403) I'll start on this new method, but are you 100% sure it will work?
  8. T

    Switch statement restrictions?

    Hi all, I have been working on a query now for about a month (you may have seen previous posts), different people have offered various solutions but so far none of these have worked. The closest I've got is with a Switch statement created in SQL view. The one below works ok: SELECT...
  9. T

    Date Query

    thanks guys. SJ that code is spot on and I can understand what it's doing so will be able to remember and reuse it...always a good thing! cheers
  10. T

    Date Query

    I don't think the Between Date1 And Date2 will work but I didn't explain the situation properly... In the table I have a Date In field which always has a date There is another date field called Date Resolved and this only has a date when the case is closed. What I need the query to do is work...
  11. T

    Date Query

    Hi all, Could someone advise on the correct query criteria I need to use to determine which records are between 4 and 8 weeks old?
  12. T

    IIF([Or/And/Else])

    SJ that's fair enough, you may well be right and I don't doubt you know a heck of a lot more than me, however you haven't seen the database design so why do you assume it is this that is causing the problems? The first bit of code you gave me works fine but I just don't know where to start in...
  13. T

    IIF([Or/And/Else])

    thanks doug, I tried it but got a compile error: Function call on left-hand side of assignment must return Variant or Object? I did notice one of the problems with the first code though because before the RB5 didn't have quotes but when I added them, one of the records gave the right results...
  14. T

    IIF([Or/And/Else])

    One step forward one step back... I thought I'd be able to get there with the full part (3rd query) but not so and when I broke it down to the most basic parts it still doesn't work?? Public Function QueryValues(ByVal VPScore As String, ByVal Spenditure As Long) As String On Error GoTo...
  15. T

    IIF([Or/And/Else])

    lol yeah right :-) Unless this is a "news group" which it technically isn't I shouldn't even be posting 'anything' Policy excerpt: 6.2 Contributions to News Groups may not be used to convey technical information or assist third parties by providing opinions or advice that could adversely...
  16. T

    IIF([Or/And/Else])

    Now armed with a VB Book for begineers the battle goes on... Ok, thinking about this differently, as the first two querie parts work fine using the iif statement in the query would it be better / possible to have the third part as the coded query (like that you suggested SJ?) so they all work...
  17. T

    IIF([Or/And/Else])

    sorry should have said, these names are only for example. Can't post the 'real' field names etc due to company policies yada yada yada... If we can ignore the names as I'll change all this later, it's just the way to code it, that's causing the headaches.
  18. T

    IIF([Or/And/Else])

    I'm probably missing funamental understanding :o I've tried various options but by chance can't get any of them to work. Well that and the complexity of the queries I need running... I'll try and explain the whole thing and if some one can give me some pointers on how I can achive this that...
  19. T

    IIF([Or/And/Else])

    going going gone mad! Sorry guys I still need help with this if you can... I have been testing and have managed to expand my code to this: Public Function QueryValues(ByVal Employed As String, ByVal SpendScore As Long, ByVal NumPurchases As Long) As String On Error GoTo Err_QueryValues...
  20. T

    Relationships

    Thanks Pat, much appreciated. I can see it all working now and think it's finally sunk in...I have to do some testing on a few other things so hope it all fits together. May have a couple more questions though ;-)
Back
Top Bottom