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...
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 =...
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...
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...
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 =...
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...
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...
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...
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...
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...
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
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
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...
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")...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.