Hello,
I'm attempting to use the OSDI toolkit to import our existing data into the FX module to fill in the T5Detail forms, however I can't get beyond "Invalid file" x(
Here's a clipping of my VB code... (the query is good and the recordset is populated).
-------------------------------------------
Dim FXModule As Profile.T2000FXModule
Dim FXFileObj As Profile.T2000FXFile
Dim FXClient As Profile.T2000FXClient
Dim rsT5 As Recordset
Dim intCount As Integer
Set FXModule = CreateObject("Profile.T2000FXModule")
Set FXFileObj = CreateObject("Profile.T2000FXFile")
Set FXClient = FXFileObj.Client
strQuery = " SELECT ("blah...")
Set rsT5 = deAppShares.cnAppShares.Execute(strQuery)
Rem If there are any records to create...
If Not (rsT5.BOF And rsT5.EOF) Then
rsT5.MoveFirst
Rem Create the same number of T5 Slips as there are records
FXClient.TableItemCount("T5DTable", 0) = rsT5.RecordCount
Rem Fill in the fields on the T5 Slips going row by row in the spreadsheet
intCount = 0
Do While Not rsT5.EOF
Rem Actual Dividend amount
If rsT5("amount") <> "" Then
FXClient.Field("T5DTable[" & intCount & ",1]") = rsT5("amount")
End If
Rem SIN
If rsT5("SIN") <> "" Then
FXClient.Field("T5DTable.S[" & intCount & ",0]") = rsT5("SIN")
End If
Rem Last name
If rsT5("last_name") <> "" Then
FXClient.Field("T5DTable.S[" & intCount & ",1]") = rsT5("last_name")
End If
("ETC...")
Rem Next employee
intCount = intCount + 1
rsT5.MoveNext
Loop
Rem Save the file as a ProFile FX data file
FXFileObj.SaveFile ("C:Program FilesProfile2001FXSampleT5Info.GFX")
End If
-------------------------------------------
When this is run, a file is created in the proper location but when I try to open it with ProFile, I get the message "Invalid File".
**** Perhaps something worth noting : If I hand enter data into the T5Detail forms and save, then the file type has the extension ".01x" not ".GFX".
Any suggestions would be greatly appreciated. :P
Preston
Page 1 of 1
File Creation Problem
#2
Posted 05 February 2002 - 04:42 PM
Preston:
The file extension does need to be changed to the year which you are creating the files for (in this case .00T) as you are using the 2000 dll file in your VB code. When you try to open the file you are creating, Profile tries to open it in the 1999 module, as that was the extension used in 1999.
Changing the extension should clear up the problem. If that does not work feel free to contact me.
Carl Jensen
Development Team
Intuit Greenpoint Software
The file extension does need to be changed to the year which you are creating the files for (in this case .00T) as you are using the 2000 dll file in your VB code. When you try to open the file you are creating, Profile tries to open it in the 1999 module, as that was the extension used in 1999.
Changing the extension should clear up the problem. If that does not work feel free to contact me.
Carl Jensen
Development Team
Intuit Greenpoint Software
Page 1 of 1


Please remember this is a user-to-user community that relies on member participation. We encourage you to ask questions AND share your own thoughts, experience and advice.

MultiQuote