Search results

  1. Nouba

    I need zero values too

    Here's the query again with adjusted field namesSELECT AC.AgeCause , Count(AR.Cause) AS CntOfAC FROM Age_Cause AS AC LEFT JOIN AgeReview AS AR ON AC.AgeCause = AR.Cause GROUP BY AC.AgeCauseHTH Nouba
  2. Nouba

    Query Parameters

    I think you have to adjust the where clause for getting all the values of the specified fields in case you just hit the enter key instead of typing in a parameter value. If you're not using the query for a cross tab, you can remove the PARAMETERS part of the query. The Nz function will give you...
  3. Nouba

    I need zero values too

    The lookup table in the following query is named T2SELECT LkpField , Count(Field1) AS CntOfOccurance FROM T2 LEFT JOIN T1 ON T2.LkpField=T1.Field1 GROUP BY LkpField
  4. Nouba

    help with simple query joining tables

    Give this a try.SELECT P.Client_ID , C.Client_Name , P.Year , P.Code , P.FileNumber , P.ProposalPhase , P.JobPhase , P.Active , P.WorkDescription , P.Project_opened , H.F_Name , H.L_Name FROM HFP_Personnel AS H RIGHT JOIN (Client AS C INNER JOIN Projects AS P ON C.Client_ID =...
  5. Nouba

    record counting

    You could use this query for achieving your goal.SELECT E.Member , E.Invoice , (SELECT COUNT(*) FROM Example WHERE MEMBER=E.Member AND Invoice<E.Invoice)+1 AS Cnt FROM Example AS E ORDER BY E.Member , E.Invoice
  6. Nouba

    SQL for joining two tables

    Hi, you could useSELECT H.* , M.* FROM Household AS H LEFT JOIN Members AS M ON H.AddressID = M.AddressIDHappy New Year Nouba
  7. Nouba

    Distinct???

    try a query likeSELECT competitor , Min(result) AS BestResult FROM tblCompetitor GROUP BY competitor HTH Nouba
  8. Nouba

    Launching Word from access 2k

    have a look at Find the associated EXE file and Start an app with ShellExecute
  9. Nouba

    Stock Transaction Report

    you can get some hints about that on Allen Browne's site: Inventory Control: Quantity on Hand
  10. Nouba

    Creating AutoNumber field using VB code

    use dbAutoIncrField (16) as field type
  11. Nouba

    count two records and insert a word in third.

    I think you need at least one condition to determine every third record. In the following query I use a date field for that.UPDATE tblPM AS P SET P.MyField = "my_word" WHERE (((SELECT Count(*) FROM tblPM AS T WHERE T.MyDate < P.MyDate)+1) Mod 3) = 0 hth nouba
  12. Nouba

    How to delete first value in records?

    you could also use an update query likeUPDATE HYDRAT_STATIONS_ALL AS H SET H.EASTINGA = Right$([EASTING], Len([EASTING]) - 1) HTH nouba
  13. Nouba

    Totaling columns of time(not rows)

    try out this query and rename the fields by replacing tTaskID with your task's field name and tTimeSpent with your Date/Time field name.SELECT T.tTaskID , Format(Int(Sum(CDbl([tTimeSpent]))) * 24 + Hour(Sum(CDbl([tTimeSpent]))),"00\:") & Format(Minute(Sum(CDbl([tTimeSpent]))),"00") AS...
  14. Nouba

    need negative values

    Try an update queryUPDATE theTablename SET [aNumber] = [aNumber] * -1
  15. Nouba

    Some sort of crosstab query... I think

    There seems to be no need for a crosstab. Try thisSELECT P.[Child Position] , Count(P.[Child Position]) AS [Number] , Count([P].[Child Position])/(SELECT Count(*) FROM tblPosition) AS Percentage FROM tblPosition AS P GROUP BY P.[Child Position] ORDER BY...
  16. Nouba

    Running Sum with Calculated Control

    What does the ControlSource say?
  17. Nouba

    Filter by Criteria Selection

    Try this one with just hitting enter for getting all recordsSELECT Lastname FROM tblPeople WHERE Lastname Like [Enter Name] & "*" HTH nouba
  18. Nouba

    Macro for startup???

    the user admin (the default user) shouldn't have any rights on the database, otherwise the db could be opened and changed from any pc with Access. For more information look at Frequently Asked Questions About Microsoft Access Security for Microsoft Access versions 2.0 through 2000. nouba
  19. Nouba

    Button Text

    Use the MouseDown and MouseUp events for changing the button's caption. HTH nouba
  20. Nouba

    Dlookup

    assuming that Title is of type text, you could tryintCollCod = DLookup("Code", "Collections", "[Title] = '" & Me!Title & "'") HTH nouba
Back
Top Bottom