Search results

  1. B

    If...then...elseif... What am I doing wrong?

    good question so here is the answer: (0) is the internal number = a key given by our database. And all our customers got one. (1) is RRN = Population Register Number (mandatory in Belgium) (2) is KBO = basically the same but for Companies (so = Company number) but sometimes we have not one of...
  2. B

    A thought for Christchurch (New Zealand) earthquake victims

    ... I have a few friends there I met during a trip last year. And I hope they are doing well. No news yet (it is the night for them so I'll have to be patient).
  3. B

    If...then...elseif... What am I doing wrong?

    or the Print # version: If IsNull(rs.Fields(1).Value) Then 'check if RRN is empty If IsNull(rs.Fields(2).Value) Then 'check if KBO is empty Print #1, "<"; rs.Fields(0).Name; ">"; rs.Fields(0).Value; "</"; rs.Fields(0).Name; ">"...
  4. B

    If...then...elseif... What am I doing wrong?

    oh yeah, I noticed. that's why I changed a bit the script since then Now it looks like this: Do While Not rs.EOF If IsNull(rs.Fields(1).Value) Then 'check if RRN is empty If IsNull(rs.Fields(2).Value) Then 'check if KBO is empty Writeout = Writeout & "<" &...
  5. B

    If...then...elseif... What am I doing wrong?

    thanks for the tip although now I have neither KBO nor RRN in the first records, and both of them (where one of them is Null) a bit further. Will dig a bit more but any comment is very appreciated :)
  6. B

    If...then...elseif... What am I doing wrong?

    something like this? If isnull(rs.Fields(1).Value) then
  7. B

    If...then...elseif... What am I doing wrong?

    Hello, I'm trying to extract information from a query and create a XML file. No problem with that. My script is working perfectly (and thanks to helpers here on this forum). There is a bunch of fields that I don't want to show as there are empty of value. Fields are (0) or (1) or (2), (0)...
  8. B

    Replace specific characters into another one, in a table field (ADO)

    At this point We have a use of it twice (!) every month, but for hundreds of lines (soon thousands). But I'm sure your script is gonna be useful for another DB we have. Unfortunately we cannot change them all straight from the start. And so today I'll thank you for the code because I know we can...
  9. B

    Replace specific characters into another one, in a table field (ADO)

    hello, thanks at a first sight, it is not only changing one field in one query/table... but the whole DB? Am I right? I just wrote a couple of Update queries but it is quite heavy and slow. If I am able to use your clever script, ... well, I would love to!
  10. B

    Replace specific characters into another one, in a table field (ADO)

    this looks what I need it is just that I don't get where to put the table name and the desired to-be-changed field name ?
  11. B

    Replace specific characters into another one, in a table field (ADO)

    Note: I could use an Update Query like this UPDATE T_CE_RP_PROPOSAL SET DebAdrTxt = Replace([DebAdrTxt],"È","E"); but that character is not the only one. So it is gonna be a pain (List : Á À Ä Â Å Ã => A É È Ë Ê => E Í Ì Ï Î => I Ó Ò Ö Ô Õ => O Ú Ù Ü Û => U N° => "" (empty space) ´ => "" `...
  12. B

    Replace specific characters into another one, in a table field (ADO)

    Hello all, I found this on this forum but it is a DAO version and my employer desactivated the DAO (they want now the very last version). And moreover I'm not sure how to convert it into ADO. Function ReplaceAccents(strTextToReplace As String, strTextToUse As String) Dim qdf As DAO.QueryDefs...
  13. B

    Count records in SQL, if... then ... else do nothing end if

    I had to slightly amend the line this way: If Nz(DCount("*", "FR_Loan_type_1"), 0) <> 0 Then all fine now thank you a lot +1 point
  14. B

    Count records in SQL, if... then ... else do nothing end if

    i'm definitely not good working with recordset here is what i was trying. Dim dbs As adodb.Connection Dim Db As String Set dbs = New adodb.Connection dbs = Application.CurrentProject.Connection dbs.Open Db Dim QueryCount As adodb.Recordset Set QueryCount = dbs.Recordset("SELECT...
  15. B

    Count records in SQL, if... then ... else do nothing end if

    Interesting, I didn't think I would need a use of BOF and EOF for a single Query. Note I do have already my Connection set up (just being now at the top of my procedure) I'm using ADO references and so will have a test on it. zzzZZZzzzz wake brain. Need to finish it today.
  16. B

    Count records in SQL, if... then ... else do nothing end if

    I thought it was easier... I'm trying to: 1/ Count the number of records in the Query "FR_LOAN_TYPE_1" (field "REFPMT") 2/ use that count value into a condition 3/ if countvalue > 0 then ...**do the stuff ** else ** do nothing ** end if It must be something wrong, maybe a Dim statement, maybe...
  17. B

    Dlookup and Dmax

    Got the same thing: 2 conditions into a dLookup but with a Max in there. in fact, my Dmax is in another function (as I need it as well) How to use my Dmax function result? (called Loan2FRbatchNum() ) Basic idea is in green my dMax side = Public Function Loan2FRbatchNum() Dim LoanBatchNum...
  18. B

    For...each .value on selected columns

    This is just absolutely beautiful. I close this thread as SOLVED thank you so much (the scale button is awaiting for a click)
  19. B

    For...each .value on selected columns

    interesting this, and all kind of Array's that I never used are probably my solution. ... if at last I am able to use them dim i as long .... Print #1, Tab(3); "<"; lvl3; ">" Do While Not rs.EOF For i = 0 To rs.Fields.Count - 1 If i = 3 Then Print #1, "<ADDRESS>"...
  20. B

    For...each .value on selected columns

    after every "Field3.value" for example there is no real condition, just a specific place where to input some characters I thought about something else but I don't know how to use it: at the moment I'm extracting using fld.name and fld.value from rs is there a way I can extract from a specific...
Back
Top Bottom