Search results

  1. N

    Help with strings

    @Nigel It has been ENORMOUSLY helpful (caps for emphasis, not for shouting). Thank you.
  2. N

    Help with strings

    Awesomeness surrounds you...:) I think we may have overcomplicated the issue a bit, thus I have taken a step back and, thanks to an idea I got from your code, stripped the 'functions' down to the basics. My version is nowhere near as sexy as yours but it has survived several rounds of testing...
  3. N

    Help with strings

    @Nigel - did you sleep last night? That's a lot of code. Thank you. I 'll work my way through it @vbaInet - they are firewall/ids logs (good guess Nigel). I have attached a txt file containing 6 copy-and-paste examples taken directly from the emails and a description of what I am trying to do...
  4. N

    Help with strings

    looks promising, I 'll try it in the a.m. yup, bed...
  5. N

    Help with strings

    It would be good it it was that simple (maybe I'm just being too complex?) please see the attached example matrix file of how I am trying to break down the data. BTW. Thank you very much for all you help so far...
  6. N

    Help with strings

    @vbaInet - the code I am trying to get working is used to put the data into the database. The method is:- text email comes in as per the previous examples the code in my previous post "breaks up" the email and inserts it into the fields i.e. I am not using the code to extract the data I am...
  7. N

    Help with strings

    @Nigel - looks better but still not working @gemma-the-husky, the source is a text email. Some examples:- 11/20/2011 23:24:53.224 - Alert - Intrusion Prevention - Probable port scan detected - aa.aa.aa.aa, bb, cc - mm.mm.mm.mm,nnnn,pp name.domain.extension - TCP scanned port list, 4352...
  8. N

    Help with strings

    @vbaInet - bit of a problem doing that, the backend is a substantial SQL db containing confidential information. My code however:- Dim Fields, varArrayEntry, cma, cmaArray As Variant Dim strMsg, strswSource As String Fields = Split(strMessage, " - ") cma = Split(Fields(4), " ") Dim...
  9. N

    Help with strings

    Not sure that that's the problem. Reading some stuff about array variants, variants of arrays & variant arrays of variants. Brain hurts.... Oh for C#'s Convert.ToString....
  10. N

    Help with strings

    Oh I hope so, losing the will to live....:) No, still "type mismatch" - reading about referring to an array index though
  11. N

    Help with strings

    using:- tb1!swSourceName = Trim$(cmaArray(Abs(UBound(cmaArray) >= 3) * 3)) and getting a "type mismatch" error - just trying to work out why, suspect that the array result is not a string whereas the db value is set to nvarchar
  12. N

    Help with strings

    Hi again Nigel, Sorry, doesn't work. The problem is that, if cma(3) doesn't exist, the code does nothing. I.e. if the string is 192.168.x.y, aa, bb, cc & I do thisMsgBox "0: " & cma(0) & " 1 :" & cma(1) & " 2 :" & cma(2) & " 3: " & cma(3) then it returns 0: 192.168.xx.yy 1: aa 2: bb 3: cc...
  13. N

    Help with strings

    Thank you guys, got that part working but I have come across a problem with one of the array fields (field no 4) Field 4 usually look like 192.168.x.y, aa, bb, cc for which I have used the commas to split the field and allocate each value in the array listing Dim cma, cmaArray As Variant For...
  14. N

    Help with strings

    nanscombe & Taruz, that's great thank you. @vbaInet - the "file" isn't very big at the moment but it is growing at roughly 10 entries per hour nanscombe, I'm trying your method but I'm getting an odd result, I'm doing... Private Sub Form_Load()' I have tried _Open & _Current as well Dim...
  15. N

    Help with strings

    Sorry if I didn't explain properly, the "logfile" is emailed to a mailbox. It is then harvested into a SQL db table. Using Access 2003 with that table as a control source, I am trying to split the string into several fields. I think the principal is the same, but I should have mentioned that...
  16. N

    Help with strings

    @vbaInet - the data comes from a nvarchar field in a SQL db which is populated from an email body, no import export facility, just a control source or record source @MSAccessRookie - I started going along the lines of (swMessage being the filed name): "swName = Mid(swMessage, InStr(33...
  17. N

    Help with strings

    Greetings Gurus, I have run out of ideas on how to perform some string manipulations and am hoping you may help. I am trying to extract substrings from a logfile and insert them into my db. Example strings: 12:14:56 - bob - logon - bobspc - 192.168.0.1 - 192.168.0.2 - thisserver - 1,2,3,4,5...
  18. N

    Outlook email to Access

    It seems that each iteration needs to run in its own sub, i.e you need one for "Private Sub olInbox_ItemAdd(ByVal Item As Object)" and another one for "Private Sub olPublicFolderName_ItemAdd(ByVal Item As Object) but at least its working now.
  19. N

    Outlook email to Access

    Greetings Gurus, Could you please help? I have some vba running in a ThisOutlookSession.OTMPrivate Sub olInbox_ItemAdd(ByVal Item As Object) On Error GoTo Err_olInbox_ItemAdd Dim appAccess As Object Dim objDBase As Object If Item.Class = 43 Then 'tried Or Item.Class = 45 in case...
  20. N

    Summing subform values on a mainform

    Hi vbaInet & thank you, I found an "easier" and possibly more elegant way to achieve the goal. Instead of adding the two subform's values in a textbox on the Main form, I created two textboxes on the Mainform using the subform's values as their control source, with your Iif(IsError) declaring...
Back
Top Bottom