Search results

  1. P

    Appending to a table I am querying

    I am sure this is straight forward but I just can't seem to crack it! I have a table which is linked Excel spreadsheet and another which is a copy of some of it which I use with my Db forms and reports. I am trying to append any missing records from the SS table into the other. The query I...
  2. P

    SQL Syntax, incorporating a variable

    Thanks, but I knew I wanted a string format, ie inverted commas around it. and that is what I thought I had with: & "' Me.product_choice '" & The debug print of the SQL shows me scalextrix solution is correct and mine isn't, but I don't see why? Cheers
  3. P

    SQL Syntax, incorporating a variable

    Thanks both of you. I went for your solution scalextrix and it worked fine. I am not quite sure why yours worked and mine didn't, they both try to put a quote around the variable when it is 'read' as StrSQL, however the proof is in the result !! Thanks
  4. P

    SQL Syntax, incorporating a variable

    Merry Christmas !! I think I must have had too much Christmas cheer as I can't get the syntax correct for this SQL statement I am modifying. I want the variable (Me.product_choice) from the form that kicked off the code to be read in the SQL but I don't seem to be able to crack it. StrSQL =...
  5. P

    Date stamping records

    OK I have found the explanation and solution. SQL expects dates to be in US format, it then converts them using regional settings before putting them into to a table. This knowledge base article explains: http://support.microsoft.com/default.aspx/kb/210069/ I was using Now() to datestamp with...
  6. P

    Date stamping records

    Same thing, the month and day are reversed !!!!!:D
  7. P

    Date stamping records

    Thanks. I tried it and it too got converted to US format :mad: Same as before everything appears UK except the end result in the table. Cheers. :confused:
  8. P

    Date stamping records

    I have a VBA routine which is using SQL to update a field in some records to indicate they have been actioned. A debug.print shows that the SQL string has the date part in european format yet the date that get placed in the field is in US format :(! My PC is set for UK format so I guess it is...
  9. P

    Conditional Sums for a report

    That's neat, thank Brian Peter
  10. P

    Conditional Sums for a report

    I tried : Count0to10: Count(IIf([Total Value]>0 And [Total Value]<=10,[Total Value],0)) But it returns the same value whatever the 'range' in the if statement, 1070. So it seems not!
  11. P

    Conditional Sums for a report

    Thanks This seems to work Sum0to10: Sum(IIf([Total Value]>0 And [Total Value]<=10,[Total Value],0)) Can Count be used in a similar way to count the number of items summed? Cheers Peter
  12. P

    Conditional Sums for a report

    Thanks Brian. That is ok except I have some negative values so it has to really be >0, <10. Rather than inferred by just <10. I suppose I could do a <0 and subtract but that seems a bit clumsy! Peter
  13. P

    Conditional Sums for a report

    I am using a simple query for a report The query produces a value for each line by multiplying a quantity by a cost. Total Value: [cost] * [quantity] I want to also obtain the sum of these Total Value(s) between set figures to use in the report. For example: Sum of Total Values between 0 and...
  14. P

    Visual Indication

    I have tried the conditional formatting and been able to make it work, thanks What I have done is put some text and value in a couple of cells and changed the font colour to white. If the tested conditions change then the background becomes dark blue and the text/value appear as warning! Peter
  15. P

    Visual Indication

    Thanks both. Chris your idea seems closer to what I want. Doing the logical test was not the problem it was linking its outcome to a visual change. I will try it and see when I am back at work at let you know ! Cheers Peter
  16. P

    Visual Indication

    Is there a way to produce a visual indication in a sheet based on the results of a formula? (I have written a lot of code in Access, but never in Excel !!) I want to test a linked cell, when the sheet is opened, is equal, > or < than another cell in the sheet. Cheers Peter
  17. P

    Exporting a table to a text file

    zzoemie, you have given me the answer! The user of the routine was opening the csv it created with Excel to check its contents, and then saving it. Excel was strippng out the leading zeros! They are now using Notepad ! Thanks
  18. P

    Exporting a table to a text file

    No suggestions then?
  19. P

    Exporting a table to a text file

    There does not seem to be a place where you can select the field type when exporting to a txt/csv file, it should all be text??
  20. P

    Exporting a table to a text file

    Can anyone solve this for me? I am exporting a table into a text file and using a specification to do it. "strSpec = "Promonth Import File Export Specification" strFile = "Promonth Import Table dmy" DoCmd.TransferText acExportDelim, strSpec, strFile, "H:\Userdata\Promonth Import...
Back
Top Bottom