Right off the bat I would recommend you start using ADO instead of DAO.
Here is some sample code.
'Here is the connection string to the DB:
gstrConnect = "Provider=Microsoft.Jet.OLEDB.4.0; Password=; Data Source=c:\inetpub\wwwroot\coupons\db\report" & CompanyNumber & ".mdb...
Here is one solution using the LockWindowUpdate API.
Put this declaration at the top of a module to make it global:
Public Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
To turn off refresh:
LockWindowUpdate frmWhatever.hWnd
To turn it back...
It's definitely possible.
This is a tool which claims to simplify the process. It is geared towards Access97 and VB5, but my guess is that there wouldn't see any problems using Access 2K and VB6.
http://hem.passagen.se/eriks/develop/tools.htm
Here's a fast and simple way.
ADO recordsets support a GetString method which converts the entire recordset to a string. It's very fast and clean.
rsTmp is an ADO recordset populated with some data...
Open "c:\temp\export.txt" For Output As #1
Print #1...
You can use SELECT INTO SQL to do this. It worked for me against Access and SQL Server 2000.
This will fail if the object exists, however.
cnnADO.Execute "SELECT *, ' ' as Col1,' ' as Col2 INTO tblNew FROM tblOld"
What this does is copy all records from tblOld to tblNew and creates...
Here's a sample function that will take a SQL statement and return an ADO recordset. It will work for any OLEDB provider, including Jet3.51 or 4 you will use with Access.
Substitute your own errorhandling and connection string. The connect string should not be hardcoded. It was changed here for...
This is from VB6. It should work within Access.
Dim objConn As ADODB.Connection
Dim rsTmp As ADODB.Recordset
Dim strConnect as String
strConnect="Provider=OraOLEDB.Oracle.1;Password=some_password;Persist Security Info=True;User ID=User1;Data Source=DBname"
Set rsTmp =...
You want to run the Package and Deployment Wizard to create an internet package. This will create a .cab file containing the relevant deployment files.
The codebase parm should reference the cab file, e.g.
CODEBASE="RTFWeb.CAB#version=1,0,0,1"
If you need addition info on how to call...
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.