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 | ...
The secret here is to rename the fields in your table to the default values recognized by the TransferSpreadsheet action, i.e. "F1" for field 1, "F2" for field 2, etc.
Once you do that, you can loop through the workbooks and import the specified range without using an import specification...
I would use a single connection instead of opening a new connection for each image. You can add a module-level variable in the report's module to hold the connection object, and do something like this:
Option Explicit
Private mcnnSQLServer As New ADODB.Connection...
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...
The looping section I posted was just a replacement for the loop you already had in your function:
Public Function ParseFld()
Dim intPtr As Integer 'Pointer for location of multiple spaces in strIn variable
Dim intlen As Integer 'Variable to hold length of strIn...
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.