Search results

  1. S

    Query With Multiple Wildcards in Multiple Fields

    Hi, I think your problem is here: ((InspectionRecords.InspectDate) Between "#01/01/2000#" And "#01/01/2040#") is InspectDate of type Date or Text? If Date, no " , if Text no #. Simon B.
  2. S

    Alternate to Replace() in access 97

    Hi, Have a look there: http://www.mvps.org/access/strings/str0004.htm That might be your solution. Simon B.
  3. S

    Using AND in INNER JOIN

    Hi, I'm assuming that the combination of LOG_ID and SERVICES_ID is unique in SERVICESLINKS. If so, the following query should do what you want: SELECT DISTINCT * FROM LOG WHERE LOG_ID IN (SELECT LOG_ID FROM (SELECT SERVICELINKS.LOG_ID, Count(SERVICELINKS.LOG_ID) AS CNT_LOG_ID FROM...
  4. S

    Joining 2 queries.

    Hi, Missing brackets (in red) SELECT * FROM [All Rejections Query] INNER JOIN [Totals Query] ON [All Rejections Query].ID = [Totals Query].ID BTW, a good practice is to NOT use spaces in object names. Simon B.
  5. S

    Joining 2 queries.

    Hi, Do you have some kind of ID in both queries? Something like patient ID or number? If so the syntax for your record source would look like this: SELECT * FROM query_1 INNER JOIN query_2 ON query_1.ID = query_2.ID Hope that helps, Simon B.
  6. S

    Cartesian join in Access

    Hi, A cartesian JOIN can be done with this syntax: FROM Qry_Sub2_TotalCommPdByCustID, Qry_Sub2_TotalInvByCustID Remember that this will give you EVERY possible combination of query_1 and query_2, so num_row_qry_1 X num_row_qry_2. Is this really what you want? Simon B.
  7. S

    Check if excel workbook is protected before opening it

    Hi, This will work: Public Sub TestExcel() On Error GoTo TestExcelErr Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim strFileName Set xlApp = CreateObject("Excel.Application") strFileName = "C:\ADSB\my_excel_file.xls" Set xlBook =...
  8. S

    Need help with Update Query

    Hi, I do not really understand what is the goal but this query would work assuming that Company Code is of type Integer and Reserve Amount is a Double: INSERT INTO Table1([Company Code], [Reserve Amount]) SELECT 12, SUM([Reserve Amount]) FROM Table1 WHERE [Company Code] IN (1, 5, 6, 7, 8...
  9. S

    Copy B/E table from F/E

    Hi again, Since I wanted the structure only to be copied I found a way to do it. DoCmd.TransferDatabase acImport to import the structure to the F/E and then DoCmd.TransferDatabase acExport to export it with the new name to the B/E Seems to work fine. Simon B.
  10. S

    Copy B/E table from F/E

    Hi there, I'd like to know if there is a way to programmatically copy a table that is on the back-end (both the original and new table are on the back-end) by running code on the front-end. I will then link that new table to the font-end. Thank you, Simon B.
  11. S

    Automatically add module to new DB

    That's nice!!! this is exactly what I wanted, however we are not going to have Access 2007 at work anytime soon....
  12. S

    Automatically add module to new DB

    That's a good idea, not quite what I wanted, but that could do it Thank you very much, Simon B.
  13. S

    Automatically add module to new DB

    That's exactly what I did not want to have to do... Thanks, Simon B.
  14. S

    Interesting Duplicates Issue

    Hi, Could you post you query (in SQL) and a sample of what you expect as a result?
  15. S

    Automatically add module to new DB

    Hi, Is there a way to configure Access so that it automatically adds a specific module (.bas file) when creating a new DB? Same thing would be useful for References... Thank you, Simon B.
  16. S

    Check if UserName is in UserID field in table

    Hi James, Environ$("Username") will give you the username of the person currently logged on the computer. There are other Environ variables available that are worth looking at. Simon B.
  17. S

    Please Help

    Hi, If you have it in a query try: [postcode] like [enter post code] & '*' You should always be using ' instead of " in SQL, for portability. Simon B.
  18. S

    Please Help

    Hi, Your query should look something like this: SELECT field1, field2, ... FROM your_table WHERE Left(postcode_field, 2) = 'what_you_want' or SELECT field1, field2, ... FROM your_table WHERE postcode_field LIKE 'XX*' Is that what you need? Simon B.
  19. S

    Query to concatenate records in a table with no key

    Hi, It is possible to do. You will need to create a function in VBA that you are gonna use as an "agregate" function in a query. It is slow to run but does the job. I'll post the code in a couple of hour if no one as a solution until then. (I can't access it from this computer...). I think...
  20. S

    Working Day - Idiots Guide?

    Hi, I'vo got these two functions which might help you out. Thing is they are coded in French so you might need to translate to something more meaningful to you. Jour = Day, Ouvrable= Working, Delai = Delay, Debut = Start Public Function JourOuvrable(dtDate As Date) As Boolean Dim...
Back
Top Bottom