Search results

  1. A

    Show all dates in any given month / quarter

    Creating a second table to hold a reference to which quarter each month belongs to will allow you to edit the queries so as to give all the dates in a quarter or over a number of consecutive quarters or even for a whole year assuming your quarters correspond to the calendar quarters. If the...
  2. A

    New to Access help with easy query

    If the <> doesn't work then try the word Not as in Not 'x' or if the field contains nothing when not completed and 'x' where completed then use Is Null
  3. A

    Show all dates in any given month / quarter

    Not sure how to build something to give all dates for a quarter but the following should allow you to get all dates for a particular month. 1) Set up a table with 1 number field, DayNo 2) Add records for numbers 1 to 31 3) Build a select query as follows SELECT [DayNo] & "/" & [Month No?] & "/"...
  4. A

    Can I make these 2 queries become 1?

    It sounds like you need 3 select queries to get the values you want and then 1 final query to combine them all. Query1: As currently - Count number of records for each testscreen Query2: As currently - Count number of successful results for each testscreen Query3: Count number of failed...
  5. A

    New to Access help with easy query

    The complete flag is referring to the field that you set with an 'x' for complete, with 'x' being the flag that the process is completed. The <> 'x' criteria should give you all records where the field is not set to 'x'
  6. A

    New to Access help with easy query

    Just build your query in the normal way and add the fields you want to see. Ensure that the field with the 'x' flag is included, if you don't want it to display then just untick the Show box. You then need to enter the criteria you want to use for the query in your case this criteria is <>...
  7. A

    Can I make these 2 queries become 1?

    There are two ways to get the 3 fields into one query 1) Build a third query based on the other two queries, linked on TestScreen with the 3 required fields added. 2) Build a query similar to the second query with a DCount to get the total count of tests for each TestScreen, SQL as below...
  8. A

    New to Access help with easy query

    Not sure if this is what you mean but is it as simple as writing the query to return all records where the required field is not 'x'. If so then SQL as follows should work SELECT Field1, Field2, Field3, ...... FROM Table WHERE RequiredField <> 'x';
  9. A

    Group by more than 1 hour

    My solution depends on how the data is recorded. Looking at the sample data you have given it appears to be an hourley record that is added on the hour. Assuming that date and time are seperate fields and that the time field is in time format hh:nn:ss you could try the following. 1) Create a...
  10. A

    Unfilter a query using a custom list box value

    I take it that your iif is on the criteria line of your query, if so then you should change it to the following Like IIf(([Forms]![frmTest]![MainBox])="(All)","*",[Forms]![frmTest]![MainBox]) This will apply a filter of all records to be shown when you select (All) from your list.
  11. A

    query problem

    Just want to clarify a few things first to see if I understand how the table is populated. When a student enrols for a course there is a record entered with an EventType of 'ENR' If this student subsequently withdraws from the course there is a second record added with an EventType of 'WD' If...
  12. A

    Show "Max" of "Sum" per group

    Working from what you currently have in place you can do as follows. 1) Create a query (I've called it FamMax) based on your Family Article table and your Totals Query. Link on article, create a group query with Family and Qty and take Max of quantity field. SQL similar to below SELECT...
  13. A

    append query problem

    You need to create an 'Unmatched' query to find all records in Table1 that are not in Table2 and append them to Table2, this is available from the wizard. The query will look something like below SELECT Table1.* FROM Table1 LEFT JOIN Table2 ON Table1.Field1 = Table2.Field1 WHERE...
  14. A

    Strip out text

    The following should solve your problem. Public Function StringBefore(strOrig As String, strSearch As String) ' Extracts the string that occurs bebefore the search string specified Dim intSearchPos As Integer Dim strProc As String ' find position of first occurence of strStart...
  15. A

    DLL Add-in

    DLL/COM Add-in - Creating in VB 6 I have written quite a few useful functions that I use across a number of different databases and applications and I'd like to write them as a DLL add-in in VB that I can then call from each of the other apps. I have no experience of doing this and was...
  16. A

    Function not Available - 3075

    Thanks for the code Pat but I'm already using something similar at start-up of the application to check that all the references are OK and it's getting by this code fine and causes the error later after the user logs in. The code I have in use is below which checks for broken references and...
  17. A

    Function not Available - 3075

    I have an application that has been working for over a year with no issues and in the last month or 2 it has been causing 3075 errors on some PC's related to the use of the Date() function in sql statements. The application is in 97 and 2000 and the error has occured in both versions. The...
  18. A

    Calendar Control - Stop Future Dates?

    I have modified Mile-O-Phile's example to stop future dates for any field depending on the settings you send in the Openargs. It adds an extra element to the Openargs settings already used by using a True/False setting after the control name to decide if future dates should be stopped or not...
  19. A

    Setting #,##0.00 format in SQL statement

    namliam, That suggestion would be fine if I was not rebuiling the query each time depending on what the user selects from the form provided to them. The user selects the fields required which creates the required SQL, then use this to create a querydef, then open the query to show results. I...
  20. A

    Setting #,##0.00 format in SQL statement

    Thanks for the suggestions but the format on the table is already set to Standard with 2 decimal places which is not coming over to the query. The data is not being output to a form or report so can't use this to set the format, user just wants it to display as a table which they can then copy...
Back
Top Bottom