Search results

  1. T

    Percentage calculation

    AAAAAAAAAAAaaaaAaaaaaaaAAAAAgh! :D yes, That bit about decimal(3,0) setting to a maximum of 3 digits with 0 to the left of the decimal place? try decimal(5,2) Maximium of 5 digits in total rounded to 2 decimal places. If you've got people going over 999.99% of their target you might need to...
  2. T

    VBA coding help

    Couple of hours. (16:45 now, I tend to get home at 19:00-19:30) The direction field I added simply because your photo(path) columns were labelled North South, East and West for each entry so it was simply to differentiate a single PhotoPath Field into the respective "directions" in the output...
  3. T

    Percentage calculation

    Eep, test on the wrong field for 0 replace GoneLive with Target on your test for > 0
  4. T

    Percentage calculation

    Sorry Tiny, my bad, I forgot you mentioned the two columns were Integer Values. Because of that the output is an integer hence anything less than 1 is 0 (there is a hierarchy that comes into play if Live and Target were different datatypes to determine what the output will be, but that's not...
  5. T

    Percentage calculation

    CASE WHEN target > 0 THEN [Live]/[Target]*100 ELSE 0 END AS conversion Should do it at a basic level. 3PT I'd say 0. 5KL being infinitely more than target is open to interpretation I suppose. [edit] Removed test on live, as it's not needed.
  6. T

    VBA coding help

    It's not frustrating because I think my quick and dirty example made you stop and think about your data, what you're trying to do with it and what your code is currently trying to achieve versus what Access can do with a couple of queries. I can't do it until I get home, but I'm quite happy to...
  7. T

    VBA coding help

    Create a table tblCoords (or whatever you want to call it) and add your 4 fields in the relevant data formats. Create an index covering those 4 fields and set Duplicates to NO. To that, before you add any records, add coordID, with a type of Autonumber and set it to be the Primary Key. Add...
  8. T

    VBA coding help

    the CoordID is an Access Autonumber, that's generated as your existing coord records are imported into the table. A compound UNIQUE INDEX across the 4 co-ordinate fields ensures that duplicate co-ord data isn't imported so each combination only appears once in the table and hence has a unique...
  9. T

    HTML Tabbing (I Know) and Currency Formatting

    because you're combining static characters (the HTML) and the contents of variables (some Agent etc) into another variable, strBody to make up the final HTML that outlook will interpret. "Anything wrapped in quotes" is treated as a literal string strNotInQuotes is assumed to be a variable...
  10. T

    Query using a SQL Statement

    Because Access has no knowledge of [Test Table].[Test Set ID] in the context of your query. You Only reference the calibration table in your query (and for the love of all that is holy, DONT use spaces in your table or column names) Your syntax is a bit confusing, but if [test...
  11. T

    Populating table

    You need to provide more information. The simple bit is comparing and adding the information, the tricky bit is trying to figure out how to do that with zero information to go on.
  12. T

    HTML Tabbing (I Know) and Currency Formatting

    If you're generating the HTML in code, why not stick the results in table with the relevant spacing? SHOWING INFORMATION Agent: Some Agent Office: Some Office Showing Date: Some Date Showing Time: Some Times Occupancy: Vacant looks like a table to me.
  13. T

    Filter string: between dates

    stLinkCriteria = "[Input Date] BETWEEN #" & Start & "# AND #" & EndD & "#" is the only other suggestion off the top of my head
  14. T

    Filter string: between dates

    Format, seems to put the date in US date format on my example 09/02/2012 (9th February 2012) becomes 02/09/2012 when put through Format("dd/mm/yy", vbmonday)
  15. T

    Excel Copy Row Using VBA

    Because he's a spammer trying to build up a valid post count by quoting legitimate posts having removed the quote tags
  16. T

    error when compiling

    String Variables can't be NULL. You don't need to read the recordset values into variables at that point, test them directly. if isnull(rs!("BL")) Then display the message box. end if Your message box messages suggest you're tying to get a value from the user but message box is a prompt...
  17. T

    Question Can you use MSA Tables / data in Application such as Java?

    In short yes. You can connect to it using ADO but you cannot use inbuilt Access functions (Dcount, NZ etc etc).
  18. T

    VBA coding help

    Now I think I'm starting to get it you could do it in with a couple of queries and a couple of tables: (granted the sort order isn't quite right) based on two tables and three queries (plus another two to populate the Tables to begin with): qrySELECTYearandDirection makes a combined field...
  19. T

    VBA coding help

    Right then, so what are we doing with the Photo_Year Value (and all the other _2 values that aren't actually in the recordset)? i.e If intNewPhoto_Year > intPrevPhoto_Year Then intNewPhoto_Year = rs![Photo_Year2] End If Here what you are saying is that if the...
  20. T

    VBA coding help

    I'm going to start charging you by the line ;) strSQL = " SELECT Easting_UTM, Northing_UTM, FSVeg_Location, FSVeg_Stand_No, Photo_Year, Photo_year2, 'Assuming that field exists in the table, include it in your recordset IMG_North, IMG_East, IMG_South, IMG_West FROM Photo_Link ORDER...
Back
Top Bottom