Search results

  1. H

    reference to a fieldname fails because of quotes

    So are you saying that in my line rst2("datew")="cdbl(now)" the left hand side of the = sign is fine and all I should do is use eval for the right side?
  2. H

    reference to a fieldname fails because of quotes

    Wow 2hours! I feel very humbled and you are correct this is the file I was referencing and as I said I did not dwell on it because it worked and brought in the string as discussed. My probvlem was only after that how to force vb to realise that this is not a string but an actual field name I...
  3. H

    reference to a fieldname fails because of quotes

    ChrisO No offense taken but I have been using the profilegetitem successsfully for years. In this case too it is working fine and returning exactly as it should! You seemed to have jumped to the conclusion that my problem lay there, perhaps I should not have shortened my code for the question...
  4. H

    reference to a fieldname fails because of quotes

    Thanks for explaining the (5) & (0) parts here is the function Public Declare Function GetPrivateProfileString _ Lib "kernel32" Alias "GetPrivateProfileStringA" _ (ByVal lpSectionName As String, _ ByVal lpKeyName As Any, _ ByVal lpDefault As String, _ ByVal lpReturnedString As String, _ ByVal...
  5. H

    reference to a fieldname fails because of quotes

    Thanks for reply but sadly no luck (I don't really understand why you dim as (5) and then call it as (0) but it makes no difference.):confused: I am posting part of my code - see below it for more explanation: Dim originalValue As String Dim replaceValue As String originalValue =...
  6. H

    reference to a fieldname fails because of quotes

    I have a recordset and I need to refer to a field using a variable e.g instead of rst.Address I have rst(variable). However the variable is being taken out of an array as a string so it looks like "address". The code therefore fails looking for rst("address"). How can I adjust this reference so...
  7. H

    .bat files works fine but errors when run from vb

    Thanks for your replies. However it is difficult for me to provide full pathnames for everything as although it is always the same relative to the vb module, the module could be in various locations. I still don't know why it resorting to using my documents folder. There must be some setting...
  8. H

    .bat files works fine but errors when run from vb

    I have a bat file which outputs text to an html using awk. The files needed reside in their own folder and all works fine. However when I call the bat file from within vba (using shell) it opens the bat file but can't find the other files it needs to execute the bat properly. In fact it seems to...
  9. H

    Is It Really Null?

    try using brackets ((isnull) or (like ""))
  10. H

    tranferText to a CSV directly from sql statement- Possible?

    With a zero length string I would have trouble defining it in the transfertext method and anyway it would still be a 2 stage process. Thanks for the suggestion anyway!
  11. H

    tranferText to a CSV directly from sql statement- Possible?

    I have a SQL statement built on the fly. I want to transfer the data of that SQL to a new CSV file. So far I have had to create an actual query to dump in the data and then transferText to a CSV. Is there any way I can miss out the middle step? The transferText method seems to demand an actual...
  12. H

    calculation criteria on max(date)

    I'm grouping by people who have donated money and am looking to see who has not paid anything during the last x days. This Sql seems to work fine for me! Thanks for your help
  13. H

    calculation criteria on max(date)

    Thanks but what do you mean
  14. H

    calculation criteria on max(date)

    My query selects all those who donated to a fund.The max on the date restricts all but their last donation, working fine.But now I want to list all those who have not donated anything in the last x days (user defined). I want to use Date()- dateField>30 but now it does not let me peform the...
  15. H

    DOCmd.TranferText

    You can create a table on the fly. Lookup CREATE TABLE statement. Good Luck
  16. H

    How to catch the last record before a change?

    Thanks Pat I will try and work with your ideas! do you think looking at the recordsetclone for each record would noticeably slow down the report production?
  17. H

    How to catch the last record before a change?

    Thanks Pat but that still does not help me. I don't want to have to show a footer for every date with info etc. I want to have it in the body of the report. The footer will do stuff after I'm finished but what I want is to do stuff just before I finish i.e. the balance textbox will be invisible...
  18. H

    How to catch the last record before a change?

    I don't understand fully. Why should grouping help. Again how would I know or rather how would the report know that this is the last record of the group. To be more specific, I would like to calculate the balance of in/out transactions for each date (using a calculated field). Each date has any...
  19. H

    How to catch the last record before a change?

    I know that there is a function to look at a previous record and thus identify if there as been a change in a certain field. What I need to do is to catch the last record BEFORE a change. Obviously in a report, once it has moved to the next record, it is too late by then to change a previous one...
  20. H

    Only show balance (running sum) for last record on that date

    10 views and not one reply?!
Back
Top Bottom