Search results

  1. B

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

    something like this? If isnull(rs.Fields(1).Value) then
  2. 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)...
  3. 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...
  4. 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!
  5. 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 ?
  6. 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) ´ => "" `...
  7. 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...
  8. 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
  9. 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...
  10. 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.
  11. 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...
  12. 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...
  13. 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)
  14. 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>"...
  15. 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...
  16. B

    For...each .value on selected columns

    understood but I obtain this: <Field1>content</Field1> <Field2>content</Field2> <Field3>content</Field3> <Field4>content</Field4> <Field5>content</Field5> so without the break that I need. The goal is to obtain that list cut with that <manual> and </manual> stuff that I cannot incorporate...
  17. B

    For...each .value on selected columns

    actually, my fields are extracted with that query already but my For Each...next does not Join the queries (I need information in another query or table) So I wanted to make only one SQL with all the datas already joined but then I cannot incorporate that manual line I was showing in my previous...
  18. B

    For...each .value on selected columns

    For...each .value on selected columns SOLVED Good morning/afternoon, ... everyone, and happy Australia day to Australian people Trying to make a self-made XML export looks like I must amend this code without touching my database this is just an extract of course, you don't need everything I...
  19. B

    dlookup in a form, must display a table value

    good morning Europe, crazy man I am, just logged in even without a Hello to my colleagues because I wanted to test your new code. Well, It looks like we have a Null problem: "Invalid use of null" highlighting the "Loandate = ... " line Never had a problem like that before, my expectations on...
  20. B

    dlookup in a form, must display a table value

    I understand how it works it is just that 'if not' line is in red in my visual basic window :( Error message: Compile error : expected then or goto will give it a go for tonight, tired, cannot think anymore
Back
Top Bottom