Search results

  1. CraigDolphin

    Separate tables or one loooong table?

    More information would certainly help but there is some basic information in the post that can be used for speculation. I see tables for: People PeopleID (auto, pk) FirstName LastName etc Projects ProjectID (auto, pk) ProjectName Aspects AspectID (auto, pk) AspectName (Text) I see a need for...
  2. CraigDolphin

    Get info from the previous scan made

    There are some issues. Firstly, You need to be sure that the field names used in the DMax function are the same as the field names in the data table. You were using the field name 'Time' in the DMax, while the actual field name in the table in 'Scan time'. Secondly, your code module is not...
  3. CraigDolphin

    Function works - except with a criteria!

    Occasionally I find that wrapping a problematic parameter query criteria in the Eval() function solves some problems. But I can't say whether it would work in your case or not. It's an easy thing to try and test though. You might also need to add a NHSPsubmission = False line into your code...
  4. CraigDolphin

    DateDiff Calculation

    Sorry...guess I wasn't as clear. There's only one type of date/time field. The difference is all in what the specific values stored in the field are. If they are all whole numbers then it's just dates. If they are all less than one, they are only times. If they are decimal values, they are...
  5. CraigDolphin

    DateDiff Calculation

    [Edit] Ninja'd by Ken. Damned slow typing! ;) Datediff("h",[sch_Date]+[sch_Time],[sch_EndDate]+[sch_Endtime]) It helps to understand exactly how Access stores dates. Access actually stores dates as a 'special' type of number. In essence, a date is the number of whole days that have elapsed...
  6. CraigDolphin

    Button to generate 2 years worth of data

    Ken has given you good advice. If you do want to learn about DAO recordsets, you could start with this tutorial I found helpful once apon a time. http://www.devdos.com/vb/lesson4.shtml
  7. CraigDolphin

    Get info from the previous scan made

    Are then any null values/records in your table? The NZ function should return a 0 valued time if the dmax function finds no matching records or returns a null. I've attached a quickie db with a form that uses the logic I gave you and it seems to work just fine. When you click the button on...
  8. CraigDolphin

    Let me Introduce Myself

    Welcome Vivi. I hope you are able to succeed with your project :)
  9. CraigDolphin

    Get info from the previous scan made

    Well, here is what I would consider: 1. You need to build the where condition part of the string using date/time delimiters (#). Thusly: Hours_finish = DMax("[Hours]", "Data", "[Hours] < #" & Now() & "#") 2. Are there actually any previous scans present in the Data table for the function to...
  10. CraigDolphin

    Help calculating duration of time on a report.

    Glad it was helpful. :) And while I do appreciate the offer, there's no need to pay me anything. I learned much of what I know from many knowledgable posters on this forum and helping others periodically is my way of repaying their kindness.
  11. CraigDolphin

    Help calculating duration of time on a report.

    Have a look at the following. I've added two new queries.
  12. CraigDolphin

    Combine 2 criteria into a single criteria to show win/loss

    Yep. So use the calculated field solution in a totals select query and you should be able to do that. :)
  13. CraigDolphin

    Combine 2 criteria into a single criteria to show win/loss

    If I understand you correctly, you have a field that currently contains three possible values: Active, Closed, and Have Pricing. You want to display the word "Won" if the value is either Active or Closed, and the word "Lost" if the value is Have Pricing? If that's correct, then you would use a...
  14. CraigDolphin

    Help calculating duration of time on a report.

    Ordinarily, if you have a start date/time and an end datetime in a single row of a table or query, you would use a simple datediff (http://www.techonthenet.com/access/functions/date/datediff.php) function with the two date fields as inputs. However, if I understand you right, you need to...
  15. CraigDolphin

    Database Design for a Professional Fisherman

    In what context are you getting that error message?
  16. CraigDolphin

    Adding a Field Updates Multiple Tables

    I had a little time to kill so threw this together as a very rough working example as to how the database can be made to store the data in a normalized design, while still giving you the ability to calculate your totals by month, by incentive type, and in total very easily. The same concepts...
  17. CraigDolphin

    Database Design for a Professional Fisherman

    In that case you need to abstract your data model some more. You have various assets to track of ceretain types (rods, reels, lures, etc). Each type of asset has different attributes (taper, length, etc) you want to also track. To me that'd suggest a structure like: Table: AssetTypes Fields...
  18. CraigDolphin

    Adding a Field Updates Multiple Tables

    I think Plog is 100% correct in his diagnosis but I doubt that screenshot has the information required to advise you. Almost every field in that table has the same name. It's very hard to know what your database table structure should be without knowing what it is attempting to model in the real...
  19. CraigDolphin

    Prevent user from "Adding new record" if mandatory fields are null

    Huzinac, sorry I missed your question. I haven't been on the forum much for a while. I'm glad you found a solution that works for you. It's basically the same as I would have suggested, and is an example of what I meant in my last paragraph about conditional requirements.
  20. CraigDolphin

    David Crake – very sad news

    Wow. Very sad. He always came across as calm, professional, and highly competant on the forums. He'll definitely be missed.
Back
Top Bottom