Recent content by grego9

  1. G

    Excel 2010 VBA to retrieve value from Access 2010

    Thank you so much! Problem solved! I could have spent hours trying to spot that! :)
  2. G

    Excel 2010 VBA to retrieve value from Access 2010

    Thanks for your help on this. the Return code code is run from excel yes. Namliam - I copied the code from another process that I created and that works fine If I replace the sSQLz = "SELECT [Code Generator].* FROM [Code Generator] WHERE [Code Generator].ID=Numbeb;" with sSQLz = "SELECT...
  3. G

    Excel 2010 VBA to retrieve value from Access 2010

    Thanks - I've removed the SET part and I now get "No Value Given for One or More Paramaters" on line "rsz.Open sSQLz, cnnz, adOpenStatic, adLockOptimistic" There is definitely a value in F55 of the Spreadsheet - Confused! Any help greatly appreciated!
  4. G

    Excel 2010 VBA to retrieve value from Access 2010

    I am writing some Excel VBA to retrive a value from an Access Database called SSI20031.mdb. In a nutshell I want the code to look at the value in Sheet1 cell F55 of the excel spreadsheet and then find the record that has this value in the "ID" field of query called "Code Generator" of the...
  5. G

    Summing values in multiple columns if certain criteria are met

    Perfect - thanks for your help. I cuoldn't see how to do this at the start - but I can really see the logic now. thanks for your help
  6. G

    Summing values in multiple columns if certain criteria are met

    I would love to - but the data is a bit sensitive I'm afraid. I was looking at the structure and figure that I could do 10 Append Queries into a master table. Each query would have an If statement so that it only posted the details for each profile (1-10) into the master table. I would...
  7. G

    Summing values in multiple columns if certain criteria are met

    being a bit slow here! what would the queries look like and what type of query would it be. I think I can figure out what to do once I have got the final table - but I am bit puzzled as to how I get there!
  8. G

    Summing values in multiple columns if certain criteria are met

    I can see the logic in that. Unfortunately I can't change the way I pull in the source data. Unless you know of a clever way of converting the format I have to the one you suggest I think I may have to find another way! :)
  9. G

    Summing values in multiple columns if certain criteria are met

    I have a table that has the following data in it "Deal Number" "Profile 1 Amount" "Profile 1 Date" "Profile 2 Amount" "Profile 2 Date" all the way through to "Profile 10 Amount" "Profile 10 Date" The profile date could be anything from today to a date in 10 years in time and can be...
  10. G

    Adding number of months to a date

    Brian - I was perplexed myself! Fortunately it took you suggesting that it should work for me to double check. I re-ran the query and got error messages - but on closer inspection these errors are only against the rows where the profile1Months is blank. Problem solved - thanks for your help:)
  11. G

    Adding number of months to a date

    think I missed the square brackets off. Expr2: DateAdd("m",DLookUp("[Profile1Mths]","FERC DATABASE2"),DLookUp("[Tender Expiry]","FERC DATABASE2")) I know get a data mismatch. The tender expiry field is a date field and the profile months field is a number - but that should be fine as I...
  12. G

    Adding number of months to a date

    I amended the expression to read Expr2: DateAdd("m",DLookUp("Profile1Mths","FERC DATABASE2"),DLookUp("Tender Expiry","FERC DATABASE2")) and this errored I also tried Expr2: DateAdd("m",DLookUp("Profile1Mths","FERC DATABASE2"),[FERC DATABASE2].Tender Expiry) and this failed any...
  13. G

    Adding number of months to a date

    I am trying to add the number of months as referenced in my "profile months" field (in my FERC DATABASE2 table) to the date in my Tender Expiry field of the same table I have seen the DateAdd function where DateAdd(Interval,Number,Field) This works fine if I put DateAdd("m",1,],[FERC...
  14. G

    Convert report into individual PDF documents

    I found this bit of code which enables me to send the data from a series of queries. The only problem is that I have 1800 potential entities - so I don't really want to have to create 1800 queries unique to each business. Ideally I want to be able to run some code across one query and for the...
  15. G

    Convert report into individual PDF documents

    There is only one recipient of the reports - and not all sites will have data every month -so I don't want any blank reports going out - will this code still deliver that? thanks for your reply:)
Back
Top Bottom