Recent content by CJ_London

  1. C

    Conditional Formatting from a Table

    You can use vba to set conditional formatting referencing a table or if the control is a text box you can use sql to create a rich text field in your form recordsource formatted how you require although that does relate more to the text rather than a control back colour with regards your second...
  2. C

    Navation

    Or provide users with a .accde
  3. C

    remove extra spaces between words

    I use a simply loop in a public function which remove any number of consecutive spaces, not just two function sTrim(s as variant) as variant if not isnull(s) then sTrim=s while instr(sTrim," ") '2 spaces sTrim = replace(sTrim," "," ") ' replace 2 spaces with 1...
  4. C

    Site down

    I get this occasionally when trying to save my post. My solution is to copy my post (just in case), refresh the page - click circular icon with arrow, usually in the header bar (I use Opera browser) then click save
  5. C

    Working with Dates

    takes time to learn:) take small steps, understand what you are doing at each step before moving on to the next If you need detailed help, provide realistic data and use meaningful names. Always better to show example data and the outcome required rather than describing it.
  6. C

    Working with Dates

    use the TOP predicate combined with an order by so five most recent would be SELECT TOP 5 * FROM Q1 WHERE REP ='Bob' ORDER by SaleDate Desc my Q1 does not include a date field so this is just an illustration if you include a saledate then that needs to be in (what I called) table3 and you...
  7. C

    Working with Dates

    sql might me along these lines - you didn't provide table names so I just used Table3 1. create a initial query Q1 SELECT Table3.Rep, Sum(Table3.Sale) AS SumOfSale FROM Table3 GROUP BY Table3.Rep and then a second one referencing it SELECT Q1.Rep, DCount("*","Q1","SumofSale>=" &...
  8. C

    Working with Dates

    So why is Bob 400 and not 450?
  9. C

    Solved Relations between products : Similar Products.

    simplistically tblProducts ProductPK pName SimilarFK 1 product A 1 2 product B 1 3 product C 1 4 product D 1 Since you have 40+k records, I'm assuming this will be a manual user operation to populate the field. So to populate SimilarFK by a user choosing from a combo the rowsource...
  10. C

    Solved Relations between products : Similar Products.

    I use a similar method to @MajP I had a pharmaceutical client and they had multiple products that were 'similar'. e.g. aspirin could have many different commercial names and different types e.g. tabs, tablets, caps, capsules etc. (note tabs and caps could be an abbreviation for tablet or...
  11. C

    Working with Dates

    use an aggregate query - group on sales person, sum, sales, then order by sum sales desc given your thread title, I assume you want to limit this by date in some way. so you might have a criteria sale date between format(startdate,"yyyy-mm-dd") and format(enddate,"yyyy-mm-dd") any dates...
  12. C

    Closing Excel from Access VBA

    huh?
  13. C

    Advice when working with dates on form Between StartDate AND EndDate

    Are those dates in the first post US or UK format? and for 9/5/2024 and 10/5/2024 you have 2 valid prices if UK format or a big gap with no price from 6th September to 4th October if US format
  14. C

    Multiple user Sqlserver backend help

    Why not use an autonumber field type?
  15. C

    Closing Excel from Access VBA

    Paste your code to your post, highlight it and click the </> button
Top Bottom