Since it has been a while since you posted this question I don't know if you already figured it out. I ran your code as is and it concatenated the column values; I am guessing that is the same issue you had.
Just change the data type of the columns right after you add them to the data table...
nick,
This should get you the rest of the way. Use the "mkdir" method to create the folder. Here is an example:
folderName = "c:\bob"
mkdir(folderName)
-GS
I didn't do any error checking or cleanup but here is what I think you are after.
' begin code
Dim oFolderSource As Outlook.MAPIFolder
Dim oFolder As Outlook.MAPIFolder
Dim oMsgItem As Outlook.MailItem
Dim NewFileName As String
Set onsMapi = Application.GetNamespace("MAPI")...
I don't think I would attempt to install two versions of the Excel object, they will probably interfere with each other.
Could you instead install VB on the XP Home machine with Excel 2000, reference the Excel 9.0 object and re-compile it.
-GS
I am assuming you are referencing the Microsoft Excel object in your VB project. I would try using the lower version of the object to see if it is compatible with both Excel versions.
Just a thought,
GS
RobS23,
Since you are using late binding and you are no longer referencing the Access object you need to declare "acExportDelim" or just substitute its name with its value, as in:
apAccess.DoCmd.TransferText 2, , "exp", "C:\myfile.txt", True
Hope that helps,
-GS
Here is another link where they post code for a yield function (towards the bottom of the post)
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20385382.html
-GS
For clarification:
In the code I posted above "writePath" in the "Open" statement is a string that is meant to hold the path of the file to be stored.
-GS
aspag,
Strings do not have a "saveAsFile" method, that would be my guess why you are getting a compile error. The code below would save the string to a text file. The code would go where the "MsgBox StrReport" line is.
' start code
Dim fileNumber As Integer
fileNumber = FreeFile...
see thread709-88923
It's a long post so do a search for RowSet on that page. There was never a reply to the fix so I don't know if it fixed the problem but I thought I would point you to it anyway since I could not reproduce your problem in my environment.
Hope it helps.
-GS
You can set the form to be on top by using the win32 API function "SetWindowPos" as in:
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long...
Here is how I would do it. I would use two recordsets. You also need to use labels when referencing fields because the order is not predictable when using "SELECT *"
' begin code
Dim fnum As Integer
Dim bytesLeft As Long
Dim bytes As Long
Dim tmp() As Byte
Dim readRS As...
Shannan,
There is a book, "Upgrading Microsoft Visual Basic 6 to Microsoft Visual Basic .NET" that is very usefull when migrating a project. It contains a solution to the Forms Collection class you are using.
-GS
Shannan,
Have you tried using "Visual Basic 6.0 Code Advisor"? You can download it from:
http://msdn.microsoft.com/vbasic/downloads/codeadvisor/default.aspx
It is a plug in for VB6 that comments most of the problem areas in your code. It then steps you through the comments allowing you to...
Hi LiLgUrL,
The reason the following code does not work is that you can not delete records while opening a recordset.
.Open "DELETE * FROM Temp_Table", conn, adOpenForwardOnly, adLockPessimistic
You could however do what you want with the connection object you are using:
conn.Execute...
LiLgUrL,
Good catch! I didn't even notice you were trying to update the primary key. When I set up an example I didn't use a primary key so I didn't get an error. Glad you found it.
-GS
LiLgUrL,
Here's the way I would do it:
' start code
Set rs = New ADODB.Recordset
With rs
.Open "Select * from tblPartNumber", conn, adOpenDynamic, adLockPessimistic
For i = 1 To flgPartNum.Rows - 2
rs.Find "PartNumber = '" & flgPartNum.TextMatrix(i, 0) & "'"
If rs.EOF Then...
Lisette,
You may try moving the Dim statement to the beginning of your Form source code, because it looks like you still want Access open after the button has been pressed. Right now you have objAccess local to the scope of the subroutine. VB may be destroying the object after the subroutine...
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.