Search results

  1. JamesMcS

    Querytables? What Querytables?? - Excel

    Hi Trevor, thanks for the post, life is treating me generally well :) I'll have a play around with that and see where it gets me. For now I've gone the other way - created queries in Access with variables for criteria and am cycling through a recordset as I open and close all the spreadsheets...
  2. JamesMcS

    Querytables? What Querytables?? - Excel

    G'day all, long time... Hope everyone's well! I've got this spreadsheet with four tabs on it. Three of them have querytables looking at an Access DB and all is well. But... I want to change some of the criteria in a couple of the queries to reflect what's in a particular cell on the...
  3. JamesMcS

    Get Argument Name back from a parameter array

    Dude, you're a legend amongst legends.... I'll have a play with this in a bit - still got some minor annoyances elsewhere in the query to sort out!
  4. JamesMcS

    Get Argument Name back from a parameter array

    Morning campers! YES! a 2D array might just work.... I read somewhere on t'interweb that 29 is the limit for parameter arrays. As it happens I've got 29 countries as arguments, so that was lucky :) I tried putting 30 test arguments in, and it comes back with something about it being too complex...
  5. JamesMcS

    Get Argument Name back from a parameter array

    Grr though.... maximum arguments = 29, I already have 29 countries to put in there - git!! Do you know if that's just a limit on paramarrays, or arguments in general? I'll have aplay tomorrow, home time now :)
  6. JamesMcS

    Get Argument Name back from a parameter array

    Thought as much, thanks bud!
  7. JamesMcS

    Get Argument Name back from a parameter array

    Hi all, how's it going? Got an annoying one.... (aren't they all) I've got a routine that looks like this: Public Function Max_Salesorg(ParamArray flds() As Variant) As Double Dim i As Byte, MaxOrg As String, MaxVal As Double MaxOrg = flds(1).Name MaxVal = flds(1) For i = LBound(flds) + 1 To...
  8. JamesMcS

    Average of a number of fields

    Thanks, but this thread was solved months ago
  9. JamesMcS

    Average of a number of fields

    Forgotten I'd started this thread.... Not a design issue at all - I needed average sales, where there were sales, across a number of countries, represented by a number of different fields in the table. VBA's solution worked perfectly.
  10. JamesMcS

    populate word template from a continuous form

    A macro might do the trick. Or you could use that code in combination with a recordset and see if that works?
  11. JamesMcS

    populate word template from a continuous form

    That's the automation part. I'm not 100% sure on the syntax to be honest, but I'm thinking something along the lines of the following in VBA: Create a table Populate each cell with the data from the recordset Insert a page break Move to next record Repeat the above until EOF. There'll be a...
  12. JamesMcS

    Combining similar but not identical fields

    I think that's the way to go.... have a crack at it and let us know how you get on
  13. JamesMcS

    Combo Box - "Picks" Wrong with Similar Records

    Have a look for cascading combo boxes on the boards and see what that brings up, it's quite a popular topic....
  14. JamesMcS

    Relationships

    There's a few things that could cause problems, data types being one of them, primary keys being another. Have a look in the MS knowledge base and see if that helps: http://support.microsoft.com/kb/304466
  15. JamesMcS

    VB error #3061: too few parameters. expected 9

    I would do a debug.print on all those variables and see what's in them. First thing I saw that would error out is the len(m2)... expressions - if m2's length is zero, and you subtract 2, the left function will produce an error.
  16. JamesMcS

    Form Handling when Record not Found

    Might also be worth mentioning that the filtercriteria bit of that could be passed from elsewhere as a variable:If DCount("*","Formrecordsource","[Filterfield]=" & variablename) or if the filter is a string,If DCount("*","Formrecordsource","[Filterfield]='" & variablename"'")
  17. JamesMcS

    Calculations not appearing

    Yeah, I've had that in Access 2007 as well - haven't found a solution to it but thinking about it a form.refresh might work... Have you tried just formatting the number of seconds in the expression, as in [code]format([TotalAccrued],"hh:mm:ss")[code]
  18. JamesMcS

    Form Handling when Record not Found

    Ah, but what if there are records in the recordsource, just not matching whatever filter criteria the user has selected? Misread the open for bit as form open, dummy....
  19. JamesMcS

    Relationships

    I haven't looked at the zip yet but have you checked 'cascade delete related records' in your relationships?
  20. JamesMcS

    Form Handling when Record not Found

    You could use something like DCount I would think.Sub form_open() If dcount("*","FormRecordsource","[Filterfield]=Filtercriteria")=0 then Msgbox "Nothing to display" form.closeOr something along those lines....
Top Bottom