Search results

  1. stopher

    Report Issue

    Re: Limit of Row in report Here's one way: - Create a text box in the detail section of your report and call it SeqTxtBox. - Enter the following code into the report's Detail Format event: Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) seqNo = seqNo + 1...
  2. stopher

    Need help in looping vba

    No need to loop if you use the count function. No need to re-code a function that already exists.
  3. stopher

    Need help in looping vba

    Can you not just put a textbox in your subform that counts the records (the same way you would sum the records). The just refer to that textbox.
  4. stopher

    I can't get this report to display the records sorted

    Have you tried using the sort functionality in the report editor. Generally I would not rely on the query to do the sorting. Make the report do the sorting.
  5. 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.
  6. 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...
  7. 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.
  8. 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? -...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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.
  17. 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...
  18. stopher

    Use Max function in a query

    Nice one, well done.
  19. stopher

    Use Max function in a query

    Can you explain what it is you are trying to do in more general terms.
  20. 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 -...
Back
Top Bottom