Search results

  1. D

    Finding array limits

    Something like this? For i = 0 To UBound(myarr2) 'Loads of other code...etc etc intBatch=i Do myText=myText & myarr2(intBatch) intBatch = i + Me.ContentGroupSize - 1 While intBatch=UBound(myarr2) i = i + intBatch Next i
  2. D

    Finding array limits

    I have a couple of nested loops as follows: For i = 0 To UBound(myarr2) 'Loads of other code...etc etc For intBatch = i To i + Me.ContentGroupSize - 1 myText=myText & myarr2(intBatch) Next intBatch i = i + Me.ContentGroupSize - 1 Next i The code cycles through fine if the batch size divides...
  3. D

    Report with complex criteria

    I have a table full of advertising results that looks something like this: Keyword,Advert,Clicks,Clickthrough Rate dog,abc,35,2.5% dog,xyz,40,4.5% cat,qwe,3,3.4% cat,rew,22,1.5% cat,ghj,34,1.7% fish,hgf,56,4.5% cow,tyr,22,3.3% etc. This data contains the results of trying different adverts to...
  4. D

    Stand alone MS Access applications

    I want to discuss he creation of stand alone MS Access applications. If I create something in VB6, it is quite simple because you just get an exe file. Simple. But when it comes to Access, don't you end up with a whole bunch of other files that could interfere with another installation of MS...
  5. D

    Specifying Open File location

    How do I add that to the above code? Do I just add a comma and then add your line?
  6. D

    Specifying Open File location

    I want to always have my Open File dialog box set to a certain folder. e.g. c:\databases\current. How can I modify the code below to achieve that? strFilter = ahtAddFilterItem(strFilter, "csv Files (*.csv)", "*.csv") strInputFileName = ahtCommonFileOpenSave( _ Filter:=strFilter, OpenFile:=True...
  7. D

    Capitalization of memo field

    Fab! Thank you guys. :)
  8. D

    Capitalization of memo field

    I forgot to mention, only capitalize the first letter of each word! ProperCase or something seems to ring a bell. I will use something like: Me.YourTextBoxName = UCase(Me.YourTextBoxName) but need a ProperCase function.
  9. D

    Capitalization of memo field

    Is there an easy way to capitalize each word in a memo field? Dave
  10. D

    Null testing

    All sorted now. It was working as expected. I found another part of code that misled me. Thanks anyway.
  11. D

    Null testing

    DCrake, may I ask why you made that suggestion? Just checked that using the optional argument is only if you want to return a value other than zero if the condition is true.
  12. D

    Null testing

    There is a value in avgcpc so its not that.
  13. D

    Null testing

    I want to check that there are values in both these variables: AvgCPC and rs!Revenue. But I don't think the check for Revenue is detecting the null. If rs!AvgCPC <> 0 And Nz(rs!Revenue) <> 0 Then What is faulty with that line of code? Thanks, Dave
  14. D

    Split a string

    I want a function that takes myString like this {dogs:dog food} and splits it into 2 variables: var1=dog food var2=dog But, sometimes there might only be {dog food} in myString, in which case that gets stored var1. Any ideas how I might achieve this? It has got to cater for both potential...
  15. D

    Do While Loops

    I needed two movenexts due to the data structure. I added a moveprevious and I got the result I wanted. All fixed now. :)
  16. D

    Do While Loops

    As a side note, when I escape the do loop, do I leave the i variable hanging and need to close it off with a next i? I don't think I need to but I've always been unsure on this.
  17. D

    Do While Loops

    Gotcha! So I put something like this: For i = 1 To YahooCounter if rs.eof then exit do 'Blah rs.MoveNext Next i Is that right?
  18. D

    Do While Loops

    Something is not quite right with my code. I get a No Current Record error. Set db = CurrentDb() Set rs = db.OpenRecordset("SELECT * FROM tblTextAdsTmp WHERE DefaultID=" & [Forms]![frmDefaults]![DefaultID] & " ORDER BY TextAdsID") strYahooPreviousAdgroup = "" rs.MoveFirst...
  19. D

    Do While Loops

    Will the following code loop until I hit the end of the recordset? Or does it hit the end of a recordset and then does the Do Loop code one last time? Do 'Blah blah rs.MoveNext Loop While Not rs.EOF Thanks, Dave
  20. D

    Referencing a previous record

    CodeMaster, I can see how that could work. What about doing something like: strPreviousCity="" rs.MoveFirst Do While Not rs.EOF If rs!CurrentCity=strPreviousCity then blah blah rs.MoveNext strPreviousCity=rs!CurrentCity Loop Would that be more efficient? Would it even work? lol
Back
Top Bottom