Search results

  1. IanH

    datediff

    Had a further thought about this, and you can of course do it in one query if you use the domain functions DMax and DMin. The query would look a bit like this .... SELECT ProjectID, DateDiff("d",DMin("[closingdate]","Table1","[ProjectID] = " &...
  2. IanH

    Want to select last entry, having query probs

    The TOP 1 will choose the first record in a recordset. So you need to think about how you sort the order of the records. You say there is an [ID] field, and you would like the record with the maximum value in this field. Therefore logically you want the order sorted by ID field in a descending...
  3. IanH

    datediff

    It would be useful to know the structure of your tables but, as you said that the dates were in the same field, I would suggest you create two queries. Query 1 would group on the project ID, maximum of start date and minimum of startdate Query 2 would calculate the date difference. e.g...
  4. IanH

    Date Calculation

    I've done something similar to what (I believe) you are trying to do. I've output the code and a simple form into the attached database (winzipped). What I wasn't sure about was whether you were wanted to check against 31/12 and 31/03 this year or, for example if we were in June, 31/03 next...
  5. IanH

    SQL Problem

    I've had another look at your code. You are specifying the LOGINID and VERIFY fields twice in the first part of the select statement. The first LOGINID comes from [tbl2311014].LOGONID, the second is "EnteredBy". The first VERIFY field is [tbl2311014].VERIFY, the second "VERIFIEDBY" . This...
  6. IanH

    SQL Problem

    Got to agree with Kodo. Your original code (as posted) was in the UNION part as follows ... UNION SELECT [tbl2311014].TRANSACTIONID, [tbl2311014].TRANSACTIONDATE, [tbl2311014].METERID, [tbl2311014].SOURCENAME, [tbl2311014].LOGONID, [tbl2311014].VERIFY, [tbl2311014].DEPOSIT...
  7. IanH

    Queries

    The format function has an option to change the start day of the week, and the start week of the year. If you check out access help (look up 'format function') it will explain in detail. The simple summary is that format takes the form ... Format(expression[, format[, firstdayofweek[...
  8. IanH

    query help

    This all really depends on your table and database structure. If this has been done fairly simply, then a simple select query such as ... SELECT StudentName, SUM(results) as TotalResults FROM StudentsTable GROUP BY StudentName would give you the first query, and SELECT StudentName, Topic...
  9. IanH

    Varying security levels thru NT login

    Thanks for the help. This works fine for getting the NT login. Now I've just got to read the helpfiles to see how to vary the security settings based. Ian
  10. IanH

    Varying security levels thru NT login

    Hi guys, (Using NT and Access 2000) I have a colleague wishing to set security for a database (and specifically making all objects read only), without requiring users to enter a password. I was thinking there may be a way to check the NT login and if it matches against a small subset of...
  11. IanH

    Inner join on two tables - with record offset

    Thought I'd already tried that and failed and then realised I had offset the wrong way on the wrong table and was getting screwy results. Thanks very much Ian
  12. IanH

    Inner join on two tables - with record offset

    Hi all, wonder if one of you can help out there. I have a query with two tables (in fact two copies of the same table) that are linked with an inner join on two fields: RecordID - an autonumber and LocalID - a text person identifier. I need to join the two fields so that the localIDs are the...
  13. IanH

    tabs on forms

    Sorry if this has been answered before, but is there a simple bit of code I can use behind a control button to move backwards and forwards between tabs on a form (in the same was as you can create buttons to move backwards and forwards between records)? Thanks Ian
  14. IanH

    Is it possible to duplex print an Access report?

    Sounds like a printer setup problem. The duplex print setting is part of the printer driver not access Regards Ian
Back
Top Bottom