I had a similar problem several years ago (Access 97) when a company switched from NT to Novell for their network servers, and we had to convert our long filenames to short filenames to fix the problem.
Any file path that would be the same as either a long or short filename worked fine, so it...
I'm trying to put together a help system for a web app and I'd like to use an xml file for the data, allowing regions to translate the file and get help in their language. Has anyone done this - or is there a better way? Is XSLT an option?
I'm wondering if anyone has a good example of how to...
Try something like this:
Sub DeleteAllTables()
Dim tbl As AccessObject
Dim lngTotal As Long
For Each tbl In CodeData.AllTables
'delete all but the system tables
If UCase(Left(tbl.Name, 4)) <> "MSYS" Then
DoCmd.DeleteObject acTable, tbl.Name
lngTotal = lngTotal + 1...
On pre-XP versions of Access you can use the Active-X CommonDialog found in the system directory, filename: comdlg32.ocx
There are also many examples around the Web showing how to use the API to do the same thing, although it's much easier to use the Active-X controls which can be dropped onto...
You might try using Mod to test for page breaks, such as:
lngPlace = lngPlace + 1
If (lngPlace Mod 60) = 0 Then
Me.txtPlace = 60
Else
Me.txtPlace = (lngPlace Mod 60)
End If
VBSlammer
"You just have to know which screws to turn." - Professor Bob
I would pass the argument by reference so it wouldn't matter which form called the function:
Public Function TextGotFocus(ByRef tb As TextBox)
On Error Resume Next
With tb
.BackColor = 11796479 'custom Light Yellow
.SelStart = 0
End With
End Function
The form would call it like...
If you want to keep your table's field names, the spreadsheet needs to include the field names in the first row (maybe you already did this?):
+---+-----------+-------------------+--------------------+----
| | A | B | C | ...
...db As DAO.Database
Dim rs As DAO.Recordset
Dim strSql As String
strRecSource = Me.RecordSource
Set db = CurrentDb
strSql = "SELECT * FROM " & strRecSource
Set rs = db.OpenRecordset(strSql)
If OpenSQLServerConnection() = True Then
While Not rs.EOF
Call...
The ADO Connection object contains an Errors collection, see an example of how to use it here:
Extracting Error Information from ADO in VB
VBSlammer
"You just have to know which screws to turn." - Professor Bob
You have to use inch format, so multiply your values times 1440 (twips per inch).
VBSlammer
"You just have to know which screws to turn." - Professor Bob
The FileSystemObject in the "Microsoft Scripting Runtime" library has some good directory methods:
Function DriveIsReady(ByVal drive As String) As Boolean
Dim fso As New Scripting.FileSystemObject
DriveIsReady = fso.DriveExists(drive)
End Function
VBSlammer
"You just have to know which...
...Dim strSQLOut As String 'SQL string to create recordset based upon structure of SampOutput
'Set up SQL statements
strSQLIn = "Select * from lausd_sis_fall04;"
strSQLOut = "Select * from hseno_01_test;"
'Now open the connection to the current database
conDB.Open...
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.