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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by ide

  1. ide

    Create chart on access form using data from SQL

    Create an sql, after a chart from it, and modify the rowsource property of the chart (form's code). fe: Private Sub cmbHo_AfterUpdate() refreshForm End Sub Private Sub refreshForm() dim d as string d = "TRANSFORM Sum(Round([avgEllErt],10)) AS [SumOfavgEllErt] " & _ " SELECT...
  2. ide

    Quickly Determine if a query returns records

    MsgBox "In query2 is a record = " & fnHaveRecord("SELECT * FROM tblDBParam ") Private Function fnHaveRecord(strQry As String) As Boolean Dim rstTemp As DAO.Recordset fnHaveRecord = False Set rstTemp = CurrentDb.OpenRecordset(strQry) While Not rstTemp.EOF fnHaveRecord =...
  3. ide

    Copy Filenames into Excel

    Sub sbGetSelectedItemFileNames() Dim myItem1 As DocumentItem Dim mySelection As Selection Dim myOlApp0 As Object Set myOlApp0 = CreateObject("Outlook.Application") Set mySelection = Application.ActiveExplorer.Selection For Each myItem1 In mySelection...
  4. ide

    insert into statement from recordset

    Hi, I wonder if somebody knows: Is there a way to append records of a recordset simply into an another recordset (table)? (ADO). I have a read-only database. I want to insert some (120-100) records all at once from this into a table of the client...
  5. ide

    How To Identify Domain Name?

    fe: from environment variables Sub WhoAmI() MsgBox Environ$("USERDOMAIN") & "\" & Environ$("USERNAME") End Sub or wscript: Sub WhoAmi0() Dim WSHNetwork Dim colDrives, SharePoint Dim CRLF CRLF = Chr(13) & Chr(10) Set WSHNetwork =...
  6. ide

    Compact DB from code

    khmmm, khmmm... i use that code to compact (a currently open) database client on close ide
  7. ide

    Compact DB from code

    call the following code from the on close event procedure of your main form (or an invisible form what loads when the client starts). I use it on NT and 2000. '********************************************************************************** Sub sbCompactCurrentDatabase() Dim FS, a Dim...
  8. ide

    Create a Folder

    To create a folder named "D" in the temporary folder: Const TemporaryFolder = 2 Dim fs, d, s Dim myTmpPath As String Set fs = CreateObject("Scripting.FileSystemObject") myTmpPath = fs.GetSpecialFolder(TemporaryFolder) 'create directory if it does not exist If...
  9. ide

    compact current msaccess client on close

    call the following code from the on close event procedure of your main form (or an invisible form what loads when the client starts). I use it on NT and 2000. '********************************************************************************** Sub sbCompactCurrentDatabase() Dim FS, a Dim...
  10. ide

    Enabling Macros in Excel

    like above ... use a vbscript file (or an exe) to change the setting of security in the registry (post in a mail attachement, or insert into your document a link to the script file). If direct running from a mail attachement is disabled, zip this file and send that zip to users. you can run...
  11. ide

    Summing Hidden Columns

    if you know the address of the range is hidden, you can insert the formula into a cell with the relative address. f. e.: you want the formula into b1. if the hidden range is c4:e9 then range("B1").formular1c1= "SUM(R[3]C[1]:R[8]C[3])" the example function (bellow) sums...
  12. ide

    Summing Hidden Columns

    This line inserts a formula to the cell "C16" to sum the range above the cell C5:C15 Range("C16").FormulaR1C1 = "=SUM(R[-11]C:R[-1]C)" ide
  13. ide

    How to create xml Files with vba?

    Sub CreateAfile Set fs = CreateObject("Scripting.FileSystemObject") Set a = fs.CreateTextFile("c:\testfile.xml", True) a.WriteLine("This is a test.") a.Close End Sub ide
  14. ide

    Excel Query that returns nothing

    first in the project window, Tools/References menu enable Microsoft Access 9.0 Object Library and Microsoft DAO 3.6 Object Library (office 2000) in a module call this main sub. The "apAcc.DoCmd.RunSQL strSql" row runs an sql (string) command yielded from a text file with the function...
  15. ide

    Close Outlook command line

    part2: instead of using shell function use Sub RunAndCloseOutlookApp() Dim myOlApp As Object Dim myNameSpace As Object 'running new outlook app. Set myOlApp = CreateObject("Outlook.Application") Set myNameSpace = myOlApp.GetNamespace("MAPI")...

Part and Inventory Search

Back
Top