Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: lars7
  • Order by date
  1. lars7

    Separate Ties In Ranking Query

    Hi, This should have been I changed this "(A.[Date Started] <= B.[Date Started]))" to this "(A.[Date Started] >= B.[Date Started])" and got better results: Sorry for the confusion. Tom.
  2. lars7

    Separate Ties In Ranking Query

    Hi, I changed "(A.[Contracted Hours]<= B.[Contracted Hours])" to this "(A.[Date Started] >= B.[Date Started])" and got better results: Pay Number NI Number Contracted Hours Date Started Rank P00000021 NM0000011 37.5 10/10/1999 1 P00000018 NM0000011 2 01/01/2011 2 P00000019 NM0000011 2...
  3. lars7

    Separate Ties In Ranking Query

    Hi Skip, I gave it a go and here is the result: Pay Number NI Number Contracted Hours Date Started Rank P00000021 NM0000011 37.5 10/10/1999 1 P00000018 NM0000011 2 01/01/2011 2 P00000019 NM0000011 2 01/10/2012 1 P00000020 NM0000011 0.25 01/10/2012 2 Here is the code I used. SELECT A.[Pay...
  4. lars7

    Separate Ties In Ranking Query

    Hi Duane, The only one I have is date started but that can be the same for some records too. Thanks, Tom.
  5. lars7

    Separate Ties In Ranking Query

    Hi Guys, I'm using the code below to rank groups of records in a query: SELECT A.[Pay Number], A.[NI Number], A.[Contracted Hours], Count(*) AS Rank FROM tbl1 AS A LEFT JOIN tbl1 AS B ON (A.[Contracted Hours]<= B.[Contracted Hours]) AND (A.[NI Number] = B.[NI Number]) GROUP BY A.[Pay Number]...
  6. lars7

    Calculate Hours

    Thanks Skip, I have it working as a function now and hopefully i will understand it one day [bigsmile]
  7. lars7

    Calculate Hours

    Hi Duane, I felt, in the example, I had shown that there was no dates involved but I hope Skip accept my apology for not being clear enough and I will try to be clearer in the future. Hi Andy, Yes you are correct; it is the second code example that added the colons. Hi Skip, Thanks for the...
  8. lars7

    Calculate Hours

    Ok Thanks, Will have a look at that on Monday. Lars7
  9. lars7

    Calculate Hours

    Hi Skip, I got it: Me.Hours = Abs(t2 - t1) * 24 thanks again
  10. lars7

    Calculate Hours

    Hi Skip, Sorry I missed your amendment to the code, it works fine but how do I get it to populate the Hours Field? Thanks, Lars7
  11. lars7

    Calculate Hours

    Hi Again, I tried your code from the after update event and i got a type mismatch error. Hovering over Abs in debug mode I got Abs(tl-t2)=8.333333333333333E4-02 thanks.
  12. lars7

    Calculate Hours

    Hi Skip, This looks great but I'm unsure where it's to go. My current queries runs on the after update of the Time text box and also I was looking for the hours to go into another text box called "Hours" Thanks for your help.
  13. lars7

    Calculate Hours

    Hi Skip, I've been asked to help with someone elses databse and they don't want to change there current practises so I'm working around what they have. The time is being recorded as 1200-2000 in a text field called "Time" and them I'm converting the data with this code...
  14. lars7

    Calculate Hours

    Hi, How would I calculate the hours between to times ie, 12:00 till 20:00 = 8hrs Thanks in advance. Lars7
  15. lars7

    Date Mismatch in &quot;strwhere&quot; Code

    Hi PHV, Your code worked great. Thanks, Lars7
  16. lars7

    Date Mismatch in &quot;strwhere&quot; Code

    Hi I’m creating a query with code and attaching a where statement (strwhere2) to get information from 2 text boxes into the criteria of the field [Date Received]. strSQL = "SELECT CoverTable.Ref, LocumRequestInformation.Contact, CoverTable.Available, LocumRequestInformation.Hospital...
  17. lars7

    2 Record Sources For Word Merge

    Hi Duane, Thanks for this it works great.
  18. lars7

    2 Record Sources For Word Merge

    Hi PHV, I had a look at a report but couldn't get the formatting right (the job title wouldn't go onto the beginning of the next line if required) as the letter needs to be to an approved format. Thanks for having a look at this for me I guess the user will have to stick to copying and...
  19. lars7

    2 Record Sources For Word Merge

    Hi PHV, I tried that but my code puts each record on a different page but I want a list of names like this: Dear Manager, You supplied the following list of staff for the code "A1" job title "Doctor": Paynumber Forename Surname. A001 John Brown A002 Jack...
  20. lars7

    2 Record Sources For Word Merge

    Hi Guys, I have the following code to merge a word document and the results of a query (code and Job Title) which works fine. Set WordApp = New Word.Application If (Me.TxtQA.Value = "Safe Increase") Or (Me.TxtQA.Value = "Unsafe Increase") Then Set WordDoc =...

Part and Inventory Search

Back
Top