Search results

  1. stopher

    Calculate workdays (and defined holidays) between two dates

    Did you check the holiday table. I just copied the list but it's obviously not uk hols.
  2. stopher

    Calculate workdays (and defined holidays) between two dates

    Take a look at the attached. Open the VBA window and you will see a module (module1). It has a test routine at thee top and the actual function further down. The test routine calls the function using some chosen parameters. The output is displayed in the "Immediate" window. To run the test...
  3. stopher

    Calculate workdays (and defined holidays) between two dates

    Must have missed that. Did you mean this: So using the word "apologise" in the same sentence as berating the people you are apologising to? Surely an apology has to come with sincerity. And earlier in the same post... Rather provocative don't you think.
  4. stopher

    Data entry advice?

    This topic is often referred to as User Interface Design. For example see here: http://www.ambysoft.com/essays/userInterfaceDesign.html Speak to the users: - How does the user go about the task of changing addresses e.g. do they have a form with a particular layout? Maybe imitate the layout? -...
  5. stopher

    Creating a website

    If you build your own website then you will be investing quite a bit of time in the site development. You will also have to think about how to present your pictures. If you are new to website design then your content will be static meaning you will have to design the website each time you add...
  6. stopher

    Copying folder contents into a Dictionary

    It depends a lot on what you want to do with the data once it is in a data structure. - do you reference by the key - do you need to reference the key for a given entry - do you need to sort - do you need to check existence For a dictionary I think the check for exists is EXISTS not Contains...
  7. stopher

    Copying folder contents into a Dictionary

    Do you copy the file names? Or the links to the files? Or the contents of the files? You would not normally use an array. You normally loop through you source data and add each element one by one directly to the dictionary. Also note there is a Collection class which might be an alternative...
  8. stopher

    Access Database in a Wireless Environment

    I agree with the other posts although I thought I'd mention I created a field based ordering system by taking a client server approach (I didn't have a server d/b I could use). The client access databases would receive information (customer and product updates) by downloading xml files from the...
  9. stopher

    If-Then-Else or Case Statement

    Yes you can choose max on mileage instead. The main bit is the query qryGetMonthKey which filters all records less than the criteria for each VIN. But we just need a way to identify the highest record in each group. It can be the highest month or highest mileage. Once you have this "key" for...
  10. stopher

    If-Then-Else or Case Statement

    Here's your database with the added queries. Just run qryOutput. Going back to your other method about using IF ELSE etc, do note that one the if statement reaches a true condition it does not check any other conditions. You can use this principle as follows. For simplicity suppose we are...
  11. stopher

    If-Then-Else or Case Statement

    As mentioned, the example I gave would need to be a subquery. Also you needed to sort on Months not on Coverage. Create this query and name it qryGetMonthKey: SELECT TABLE2.VIN, Max(TABLE2.MONTHS) AS MaxMonths FROM TABLE1 INNER JOIN TABLE2 ON TABLE1.VIN = TABLE2.VIN WHERE...
  12. stopher

    If-Then-Else or Case Statement

    So rather than sort on Coverage (alphabetically), you could sort on mileage or months. If I've understood your logic correctly then yes.
  13. stopher

    If-Then-Else or Case Statement

    Following the logic on the first page of your pdf, I think you can just use a query: SELECT TOP 1 tbl1.VIN, tbl1.Months, tbl1.Mileage, tbl2.VIN, tbl2.Coverage, tbl2.Months, tbl2.Mileage FROM tbl1 INNER JOIN tbl2 ON tbl1.VIN = tbl2.VIN WHERE tbl1.Months>tbl2.Months OR tbl1.Mileage>tbl2.Mileage...
  14. stopher

    Use Max function in a query

    Nice one, well done.
  15. stopher

    Use Max function in a query

    Can you explain what it is you are trying to do in more general terms.
  16. stopher

    Use Max function in a query

    The purpose of MAX() is to return the max value over a set of records. So it only have one input i.e. the field in which we are looking for the max value. There is no equivalent to the max function in Excel. So here's three possible options: - Use IIF(a<0,0,a) - write your own max function -...
  17. stopher

    What on earth have I done!

    The form's "Data Entry" property has been set to "Yes". This mean the form is now only for new data entry i.e. a blank form. Set it to "No" and you will see many records.
  18. stopher

    Strange month behavior when formatting "mm"

    Try: Format(Date(), "mm")
  19. stopher

    Excel (VBA?)- copy and paste 2 consecutive uppercase characters in string, if present

    Oops, though it was all alpha, my bad. Try: Public Function getState(aString As String) As String Dim i As Integer getState = "" i = 1 Do While i < Len(aString) And getState = "" If Asc(Mid(aString, i, 1)) >= 65 And Asc(Mid(aString, i, 1)) <= 90 Then If...
  20. stopher

    Excel (VBA?)- copy and paste 2 consecutive uppercase characters in string, if present

    Please show an example string and the result you got when you tried the function.
Back
Top Bottom