Search results

  1. M

    Time Button

    Create button called something like btnTimeNow and in it's onClick event putcode that says [TimeOnScene]=Now() (where TimeOnScene is the name of the field) You will save the dispatcher a lot of bother by DateAlerted default to current date! Also, keep a manual override option on those time...
  2. M

    Demographic Tracking

    Just a word about age range - if at all possible, store a date of birth. This allows you to analyse age relative to the current (or any arbitrary) date. If you have a record that says "Bob is in the 35-40 age group" this will become wrong in 5 years or less (when Bob has his 41st birthday).
  3. M

    DCount criteria based on report detail

    I'm not sure what you mean? There are no criteria for the PlaceID in this context, I want to return all of them, subject to the other criteria. I have a workaround now, which seems less readable/efficient. A DCount in the report calls a query (like the one I posted) which in turn reads the...
  4. M

    DCount criteria based on report detail

    vbaInet, that's now giving me some value for each row rather than an #error or zero for each row, but the values don't seem to match anything in the underlying table! This is some SQL that returns correct results. SELECT tblPlace.PlaceID, tblPlace.SiteID, tblPlace.EndDate FROM tblPlace WHERE...
  5. M

    DCount criteria based on report detail

    Thanks for the reply. I tried it and Access prompts for Me as a parameter. I have tried entering an ID number or leaving it blank - in either case the textbox shows #error on the report. This is quite hair-tearing! ps. I changed the field name to Date just for the purposes of my post - which...
  6. M

    DCount criteria based on report detail

    Hi, I can't figure out what's wrong with this Dcount, which is the source for a text box in a report detail section - It just returns a zero for each detail row. =DCount("[ClientID]","tblPlace",("[Date] Between #" & (Date()-31) & "# And #" & Date() & "# )") And ("[SiteID]"=" & Me!Text55 &...
  7. M

    Selecting Data from 3 Tables

    I think it should look like Header:Consultant ______Detail:Event ___________SubReport:tblNonClient Since it seems each tblNonClient row is associated with both a Consultant and an Event and I'm guessing there can be any number of tblNonClient rows associated with each Event. Disclaimer: There...
  8. M

    Max versus Group By problem

    Thanks very much both of you - that looks to have done it!
  9. M

    Qry Calculation

    I think the following would work In a query, join the tables on ID select startnumber and subtractnumber and have a 3rd column as an expression calc_result:[startnumber]-[subtractnumber] If you change this to a Make Table Query you would get a new table instead of a query result set but are you...
  10. M

    Max versus Group By problem

    Hi MStef, Thanks for posting the example, but it won't work in my case because I can't guarantee that I will never have two events on the same date. Apologies for the layout - is there some way to post tables here? It even strips out my extra spaces! If I add a row to Table1 which has a date...
  11. M

    Selecting Data from 3 Tables

    I'm a bit hazy about the relationships. Is it one consultant to many events, and _separately_ one consultant to many tblNonClient? Or is it one consultant to many events and one event to many tblNonClient? If the latter, you might want to go for a sub-report. Ambiguous join errors can be...
  12. M

    Selecting Data from 3 Tables

    I'm pretty sure your query is right and you need to tweak the report. Try right-clicking a header in the report and choose 'sorting and grouping' then take a look at the options there. Define 'Consultant' as a grouping item then you probably need group header=yes, group footer=no, group on=each...
  13. M

    Max versus Group By problem

    I want to get the most recent item per client from a table. ItemID (primary key, autonumber) Date (date) ClientID (foreign key, integer) If I select ClientID (group by), Date (Max), then I get the results I'm expecting, but I want to also return the ItemID so that I can join some other...
  14. M

    Selecting Data from 3 Tables

    Could you output the results to a report to show each event and billing items for each consultant? As a query result, as far as I know, you would expect to see each consultant's name as many times as there were events they were involved in. So if consultant 1, named Bob, was involved in events...
  15. M

    vba to format textbox in report?

    I tried using Date() but I got an error, so I tried Now and it worked. It's interesting that the difference is that the parentheses are not allowed - and when I typed Now() I triggered and auto-correction. I have changed it to Date without parentheses and it works and is more appropriate, as you...
  16. M

    #name? error on report totals.

    You could simplify grand total to =((Sum([Job Price]))*1.175) note the new multiplier makes it easier on the eye and might save access a bit of work (i'm not sure how it handles Sum operations behind the scenes but it might be doing all the summing work each time you specify it)
  17. M

    #name? error on report totals.

    Not sure why this fails only after restarting access. You could, experimentally, try txt101=(Sum([JobPrice]))*0.175 which avoids referencing txt boxes by name.
  18. M

    vba to format textbox in report?

    Hello AP forums, I want the contents and format of a textbox to change depending on field values. The following is working with respect to the text, but not the formatting (BackColour). Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If [MoveOnDate] < Now Then...
  19. M

    Add Text to Chart when Data Value = 0

    Until someone comes by with a robust answer, can you take the query output to excel (which will generate a graph and allow you to manually add objects like text on top of it)?
  20. M

    Force user to encrypt Word form using template

    _At the moment_ the number of people who have to use this form is small enough that I can talk to them on the phone if they have problems with encrypting. I'm unfamiliar with VBA for Word so I'll do some research on that. Thanks for the suggestions. If you have an example you can post up that...
Back
Top Bottom