Search results

  1. S

    Question VBA string bug?

    In Immediate window strings are incorrect too, so your problem seems a little different. Still no solution found. I'm glad I've found a way to create an mdb, which works fine as long as VBA code stays intact. I export all VBA to text files, import them in a new mdb on an XP machine with...
  2. S

    Question VBA string bug?

    lol, its hilarious (and disgusting at the same time). If I step through the code and do strTabelNaam = "SubSelectieProcesInzet" strTabelNaam = empty (or "" in VBA terms) If I change it to strTabelNaam = "SubSelectieProcesInzet " strTabelNaam = "SubSelectieProcesInzet " and if I then...
  3. S

    Question VBA string bug?

    No problem, thanks for your time and tips!
  4. S

    Question VBA string bug?

    Hotfix did not solve issue. :( Maybe I should start from sctratch now Ive installed the hotfix, but I dont think that would help either. Not one of the issues being fixed with the hotfix really sounded like something that is similar with this. Look at this line of code: strTabelNaam =...
  5. S

    Question VBA string bug?

    This is a nice one too: strSQL = IIf(blnPreSelectie, "WHERE", "AND") After this line strSQL is still empty ("" or vbNewline)! My colleague is checking if we have that hotfix installed. Thx for the tip.
  6. S

    Question VBA string bug?

    As to what hotfix are you referring?
  7. S

    Question VBA string bug?

    I have the issues on 2 pc's, 1 running XP, 1 running Vista business. Both with Office 2003 SP3. As working for a software company Im sure all necessary updates are installed. I just cant imagine that a corrupt Access is the issue. Im not having problems with other Access applications. That...
  8. S

    Question VBA string bug?

    Have tried making new databases twice. Once by importing all objects, including the modules, and once by copying the code module by module. No help. I do seem to notice that it mainly happens in 'new' modules (modules I recently added). All code from before always works, although in there...
  9. S

    Question VBA string bug?

    Unfortunately converting to Access 2002-2003 format did not solve the problem. It happens again, for example in this line: strSQL = "SELECT scbID FROM tbl_SomeTable IN '" & strDBOud & "' WHERE ditSCB = True;" Here it just ignores the "SELECT scbID FROM tbl_SomeTable IN '" part. It's one...
  10. S

    Question VBA string bug?

    No it wont. It ignores newline characters. You can say: SELECT Column FROM table WHERE column2 = 23; or SELECT Column FROM table WHERE column2 = 23; OR SELECT Column FROM table WHERE column2 = 23; which will all do the same. And yes: Chr(13)...
  11. S

    Question VBA string bug?

    Pls tell me what formatting of SQL has to do with VBA not executing code correctly. If it says: strSQL = strSQL & "bvlabl INNER JOIN " & TABELNAAM & " more blabla" and the result is that strSQL only contains " more blabla", what difference does it make that the query is not easily readable or...
  12. S

    Question VBA string bug?

    vbnewline certainly has nothing to do with problem as it already did before adding newline-characters (which is what vbnewline does). At some point I thought maybe VBA cant handle long string without linebreaks so i added them later, but without any help. I know what is wrong with the SQL when...
  13. S

    Question VBA string bug?

    Maybe Access or VBA fails to handle multiple modules with numerous public procedures and functions correctly. However i find it strange that it only fails to handling strings correctly.
  14. S

    Question VBA string bug?

    I first just execute the code. It will stop at CurrentDB.Execute strSQL, because the SQL is incorrect. The reason why it's incorrect is because it fails to concatenate all strings correctly. When i then step through the code line by line at some piont it just ignores or steps over a certain part...
  15. S

    Question VBA string bug?

    placing msgbox between the lines causes it to work fine but failing elsewhere. I dont see difference though in showing msgbox instead of stepping through code and look at values in immediate window. Im really staring to lose my mind. Costing me so much time. Starting from scratch on other...
  16. S

    Question VBA string bug?

    It's an application that build reports dynamically. Based on options and filters more or less data is represented with different group by's. So dynamically creating a SQL statement gives me all the control i need, which would be very hard to achieve with stored query's.
  17. S

    Question VBA string bug?

    It seems nonsensical to me too. ;) I'm a MSCD in VB6 for years now and havent seen anything like this in any VB or VBA-environment. What I mean is if I change "[space]AS[space]ID,[space]" to "[space]AS[space]ID,[space][space]" it would work. Althugh changes would be that in another module a...
  18. S

    Question VBA string bug?

    I did create a new database one time already and copy all objects, did not help. It immediately started again. As it is an application for a large Dutch company we are working for, I cannot post the database. As to mailman's idea: The SQL I'm generating is that large that placing every...
  19. S

    Question VBA string bug?

    It uses linked tables from 2 other mdb's. Not really to exotic I think. Reinstall Access? Really cant imagine that to help as things go wrong when I copy to other pc as well. Even different OS doenst solve things, it both goes wrong with XP and Vista business.
  20. S

    Question VBA string bug?

    I've tried all the things you mentioned, but that doesnt really solve things permenantly. It might help fort a short time, but then it would do something stupid like this again, only probably somewhere else in code. I am talkin about doing compact & repair and rebooting like 10 times a day...
Top Bottom