Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Immediate Window scrolls off (Access 2003, XP SP 3)

    I am running some code with debug.print and notice that the results seem to "fall off" if too many lines are sent to the immediate window. if this is true, are there any quick work-arounds, like print to txt file?

    TIA

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Immediate Window scrolls off (Access 2003, XP SP 3)

    You could use the "classic" Basic instructions to write to a text file:

    Const strLogFile = "C:Log.txt"
    Dim f As FreeFile
    Open strLogFile For Append As #f
    Print #f, "Some text to write to the log file"
    Close #f

    (Of course, it would be better to open the text file at the beginning of your code, and to close it at the end, instead of opening and closing it each time you want to write a line)

    Or since you're in Access, you could open a recordset on a table and append data to the table.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Immediate Window scrolls off (Access 2003, XP

    thanks for the clew. VBA is confused by the line

    Dim f As FreeFile

    and I don't think I can use vbTab and vbCrLf for output formatting...which is a shame.

    perhaps I need to set a reference?

    I started to just work up a quick ASP page to display results but, apparently, the fact that the data is from linked tables in SQL Server there's some security issues to address doing it that way. A little surprising, that. I'd rather go the ASP route as the data i am trying to get displayed is going to be in list format. Basically, what I want to do is, for each row in table A, grab all rows in table B that match a certain field in Table A. Then, iterate thru all the data in Table B and go the the next row in table A and do it again. It's eventually going to be more involved that that as I want to identify records with different values as well as those with matching values and I am looking at a sort of 3 node tree:

    PCN --> All diagnostic codes --> all procedure codes in both Tables. The basic question I am addressing is, "Is there a pattern where patient A is getting a different set of procedures for the same diagnosis" and "Is there a pattern where patient A is having totally different diagnosis in table A/B". the tables are years 2005 and 2006 so I am comparing the same patient for this sort of information. If there's another way to do this than lots of looping I'd love to hear about it....

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Immediate Window scrolls off (Access 2003, XP

    Sorry, I posted air code. Replace the offending line with

    Dim f As Integer
    f = FreeFile

    You may be able to use some of the more "advanced" features of SQL, see for example EXISTS (Transact-SQL).

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Immediate Window scrolls off (Access 2003, XP

    yes - i could try to just get it going using advanced SQL. There's also datashape, which I've done a bit in the past, in ASP to webpage and even RTF. Datashape does do this kind of grouping, but it's a bit tricky and can slow down your machine if you're not careful. Well, all things to think about...

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •