Search results

  1. J

    Detailed record numbers by group in QUERIES

    Assuming CaseID is a text field, try these two queries (replacing with the correct table name in Query1). Query1:- SELECT CaseID, [Date], Value, "Date" & DCount("*","TableName","[CaseID]='" & [CaseID] & "' and [Date]<=DateValue('" & [Date] & "')") AS DateNum FROM [TableName] ORDER BY CaseID...
  2. J

    Including End dates within forms

    I'd say the one using Between And and without the need of the CDate() function. But given today's computing power, you can hardly notice their differences. .
  3. J

    Revise dates query

    If day and month are not always two digits- Left([YourDate],InStrRev([YourDate],"/")) & Right([YourDate],2) .
  4. J

    How to Query a Table to find records showing checked boxes

    See the query in the database. Hope it's what you are after. .
  5. J

    How to Query a Table to find records showing checked boxes

    Your database contains many tables and queries. It will help if you can give us more details e.g. which table, which query and exactly what you meant by "list all the entry numbers which have a text box". .
  6. J

    Max value for a single date/multiple time/single tag ID combination

    You can remove the time field from your Totals Query. Then, in a new query, join the Totals Query back to the table (i.e. by linking the fields in the Totals Query to the corresponding fields in the table) to get the required records from the table. .
  7. J

    Simple Query Not Working (Filter)

    You can place the names in a multi-select list box on the form for the user to make selections and dynamically build the query using VBA code from the On Click event of a command button on the form based on the selections in the option group and list box. .
  8. J

    Query With a Form

    The attached sample database shows how to do it in a query. Notice that the Triple State property of the two check boxes on the form has been set to Yes so that the check boxes can be Null (grayed), Checked or Unchecked. (However, in order to visually display the grayed option, I have to set...
  9. J

    Simple Query Question I Think?

    A crosstab query should do the trick. TRANSFORM First(AvgOf3rdNextAvailibleAppointment) SELECT Modality FROM [TableName] GROUP BY Modality PIVOT StartOfWeek; A table has a maximum of 255 fields. So it will work so long as there are less than 255 StartOfWeeks. .
  10. J

    LEFT JOIN??? - How to discovery tblACESSORIES not recorded in tblACESSORIES-CAR

    For the Left Join to work correctly, you need a series of two queries. See the queries in the attached database. Run the second query and enter a car cod when asked. Hopefully, you can run it in your version of Access. Just in case ... The database contains these queries. Query1:- SELECT...
  11. J

    Query With a Form

    Try setting the Default Value property of the two check boxes on the form to False. .
  12. J

    Trouble with Between Criteria in Parameter Query

    Try declaring the data type of the two parameters (in query Design View, choose menu Query, Parameters...) .
  13. J

    Query to count

    Since the table is not normalized, you can use -Sum() on an InStr() expression for each of the orange, apple etc in a query like the following. And as a table has a maximum of 255 fields, you can type no more than 255 such expressions in the query. SELECT -Sum(InStr([FieldName],"Orange")>0) AS...
  14. J

    Nested select statements

    To use the nested select statements correctly, you need to use them in a correlated way by means of aliases. SELECT tblNewTrans.Buyer, Count(tblNewTrans.Buyer) AS ["Total New Leads"], (select count(tblnewtrans.buyer) from tblnewtrans as S1 where S1.new=true and S1.[Buyer]=tblNewTrans.[Buyer])...
  15. J

    Select records in Table 1 that are not in Table 2

    Try this query (type/paste in query SQL View):- SELECT Reviews.ID, Reviews.Status FROM Reviews LEFT JOIN Results ON Reviews.ID = Results.ReviewID WHERE Reviews.Status="Not Accepted" AND Results.ReviewID Is Null .
  16. J

    fiscal year formula but with a error

    A more efficient solution:- FYear: Year([Award Dtd])-([Award Dtd]>=DateSerial(Year([Award dtd]),10,1)) .
  17. J

    How to count Wednesdays between two dates

    Dudley has shown you how to do it in the control source of a text box on a form. As for doing it in a query, please see the query in the attached database. .
  18. J

    How to count Wednesdays between two dates

    DateDiff("ww", [StartDate], [EndDate], 4) -(Weekday([StartDate]) = 4) .
  19. J

    Goto a date

    I have attached a sample database, which contains an Orders table and an Order Details table adapted from the Northwind sample. You can open the Orders main form and click on the "Goto order date" unbound list box to go to the first record of the selected order date. The code used is in the...
  20. J

    Insert new field/Value in a make table query

    The first part is rather straight forward. You can simply add NewFieldName: "Current" in the Design View of the make-table query. To add an autonumber primary key field, you need to run a separate Alter Table query after running the make-table query. Something like ... Alter Table...
Back
Top Bottom