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 Wanet Telecoms Ltd 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: *

  1. bdmclennan

    Naming files with Date built into the name

    Afternoon, Minutes should be formated as nn. Try this format(now(),"YYYYMMDDHHNNSS") & "_HOLDING" it will return: 20030903172429_HOLDING Cheers bruce
  2. bdmclennan

    Producing a unique serial number for labels

    Jasonmac, I have to do the the same sort of thing. I have included a function which I use. '=================================== 'Create tblInvoiceNo with 2 fields 'Invoice_No = LONG 'Date = DATE/TIME 'Call the function from your report e.g. =fncInvoiceNo 'Each time you call it you will get a...
  3. bdmclennan

    I am trying to compare two records from two tables.

    Create a new query and paste this SQL in then Run it. SELECT tblU.FILENAME INTO tblUNION FROM tblU INNER JOIN tblSUB ON tblU.FILENAME = tblSUB.FILENAME ;
  4. bdmclennan

    SUBSTITUTE FUNCTION IN ACCESS 97

    Here is the code. Public Sub subQueryReplace() '============================================= Dim strSQLIn As String Dim strSQLOut As String Dim db As DATABASE Dim qd As QueryDef Dim rs As Recordset Set db = CurrentDb...
  5. bdmclennan

    Need to search for string in table and return count.. help!

    Mikeyboy, Try this function which you can call from your query: Public Function fncCountField(strSentence As String, strSearch As String) As Long Dim intPos As Integer 'You position within the string If Len(fncCountField) = 0 Or Len(strSentence) = 0 Then fncCountField = 0...
  6. bdmclennan

    ORDER BY Date inc. year

    Try this order by format([date],"YYYYMMDD") desc Cheers
  7. bdmclennan

    CONVERT function

    Give these a crack, SELECT Clng(PE) AS PEnumber 'Converts to long SELECT Cdbl(Pe) AS PEnumber 'Converts to double SELECT Cint(PE) AS PEnumber 'Converts to integer Cheers
  8. bdmclennan

    RunSQL to update field in a specific row in a table

    Try this: dim strSQL as string strSQL = "(UPDATE tblM) SET TransactionDate = " strSQL = strSQL & [Forms]![frmCompanyinfo]![StartDate] strSQL = strSQL & " WHERE TNo = '4';" DoCmd.RunSQL strSQL 'Note you may have to put #'s around your start date Cheers Bruce
  9. bdmclennan

    Record Count of Each Table

    ...two thumbs up to. Create a query which you will base your report on and paste this SQL into your query: SELECT MSysObjects.Name, DCount(&quot;*&quot;,[Name]) AS recordcount FROM MSysObjects WHERE (((MSysObjects.Type) In (1,6)) AND ((Left([name],4))<>&quot;MSys&quot;)); This will give you...
  10. bdmclennan

    Select Case

    Steve, Try this. Select Case strValue Case 1 , 2 ,12 '<------this doesn't seem to work ' --do these lines of code-- Case 3 to 6 '--do these lines of code End Select All the best B.
  11. bdmclennan

    Transfer my data into another db

    ...to your live database 6a. Create query qryBACKUP_DATATACKING INSERT INTO tblBACKUP_DataTracking_tb ( ARCHIVE_TIMESTAMP ) SELECT Now() AS Expr1, * FROM DataTracking_tb; 6b. do the same for the other table 7a Create query qryDELETE_DATATRACKING DELETE * FROM DataTracking_tb 7b Do the same...
  12. bdmclennan

    Transfer my data into another db

    ...DoCmd.SetWarnings False 'Create a new backup table '-------------------------- DoCmd.RunSQL &quot;SELECT Now() AS ARCHIVE_STAMP, * INTO tblBACKUP_&quot; & !Name & &quot;_&quot; & format(date(),'YYYYMMDD') & &quot; IN 'C:\BACKUP\BACKUP.mdb' FROM &quot; & !Name 'clear local table...
  13. bdmclennan

    Transfer my data into another db

    Sorry, I forgot that you want to delete your source data. add this line AFTER the first DOCMD.RUNSQL DoCmd.RunSQL &quot;DELETE * FROM &quot; & !Name B.
  14. bdmclennan

    Transfer my data into another db

    ...With rs Do While Not .EOF DoCmd.SetWarnings False DoCmd.RunSQL &quot;SELECT Now() AS ARCHIVE_STAMP, * INTO tblBACKUP_&quot; & !Name & &quot; FROM &quot; & !Name DoCmd.SetWarnings True .MoveNext Loop End With End Sub Hope it...
  15. bdmclennan

    Times in queries

    Nick, Try this: TIM: datediff(&quot;h&quot;,[TIM1],[TIM2]) Cheers B.
  16. bdmclennan

    This Dang Set Recordset is giving me a Type Mismatch error

    Josh, Have you tried replacing your YES,NO,TRUE,FALSE with -1 and 0. I have had problems along these lines before. I also assume qrySelectedTrue runs independently of your subroutine? B.
  17. bdmclennan

    Selected items in List Box appear on one report

    Tadynn, Your Openreport statement should read like this: DoCmd.OpenReport stDocName, acPreview,,&quot;[OrderKey] &quot; & fncInList(&quot;List0&quot;, 0) Cheers Bruce
  18. bdmclennan

    SYNTAX ERROR - DoCmd IMPORT code

    acSpreadsheetTypeExcel9 should read acSpreadsheetTypeExcel97 Cheers B.
  19. bdmclennan

    SYNTAX ERROR - DoCmd IMPORT code

    acSpreadsheetTypeExcel9 should read acSpreadsheetTypeExcel97
  20. bdmclennan

    Calculations in a report, blank txt boxes stopping result.

    place nz([Field],0) around each of your fields e.g. =nz([PartTotal1],0)+nz([PartTotal2],0)...... Cheers B.

Part and Inventory Search

Back
Top