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 Mike Lewis 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

    Drop it into a new module. Then you can call it from anywhere. However: Monty has a cracking idea which I am prepared to give 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("*",[Name]) AS...
  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

    OK, Let forget the code. As you have to tables lets mak this very simple. Steps: 1. Import both DataTracking_tb and AgentTrackingModification_tb into your backup database 2. Rename each table with a 'BACKUP_' prefix. 3. Add a field ARCHIVE_TIMESTAMP (as a date) to each table 4. Delete all the...
  12. bdmclennan

    Transfer my data into another db

    OK, That code was part of one of my Libaries. It uses a pull technique to archive all tables linked to the db where it is being run. A quick modification to a push technique and you will be laughing: You will need to change 'C:\BACKUP\BACKUP.mdb' to the fully qualified path of your back up...
  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

    Here is a module which will help you. '================================== 'Goes through all access linked tables 'and creates a new backup table '=================================== Public Sub subBACKUP() Dim rs As Recordset Dim db As Database Set db = CurrentDb Set rs =...
  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