M
Marve
Hello,
Please help me with my current conversion problem from access 97 to
access 2003... we have this database which opens a file, it's basically
text but the file ext is *.1 or *.2...it uses MS Common Dialog 6.0...
Everything works on 97 but after I converted it to 2003... the program
doesn't seem to open the text files with .1 or .2 unless I change it to
..txt... I can't go on updating the files ext's because it would be a
hell lot of work.. so it would be great if someone have bright ideas to
help me overcome this problem... I'm thinking that the 2003 should be
more linient about ext's but isn't or maybe I'm just missing
something..Here';s the line of code I uses. It fails on the
lineoCmd.TransferText acImportFixed, "PROE EXPORT", _
"TBL_DATA", sfilename
Sub Openfile(sfilename)
Dim filetoopen As String
' Turn off Display of Warnings
DoCmd.SetWarnings False
' Delete Current Contents of Table
DoCmd.RunSQL "Delete From TBL_DATA"
DoCmd.OpenQuery "DeleteLoomInfo", acViewNormal, acEdit
' Import file using PROE EXPORT Specification
DoCmd.TransferText acImportFixed, "PROE EXPORT", _
"TBL_DATA", sfilename
' Delete unused records
DoCmd.OpenQuery "loadLoomToTable", acViewNormal, acEdit
DoCmd.OpenQuery "WW delete unused records", acNormal, acEdit
' Delete WWCCT Info
DoCmd.OpenQuery "WW CCTID Delete", acNormal, acEdit
' Append WWX and Y to CCTID table
DoCmd.OpenQuery "Append WWX", acNormal, acEdit
DoCmd.OpenQuery "Append WWY", acNormal, acEdit
' Turn on Display of Warnings
DoCmd.SetWarnings True
' Change Title and Export Label to Reflect Loaded Assembly Name
'filename = Left(sfilename, InStr(sfilename, ".")) +
CStr(Right(sfilename, Len(sfilename) - InStr(sfilename, ".")) + 1)
WWName = Right(sfilename, (Len(sfilename) - InStr(sfilename, ".") +
6))
'Open report form
Dim stLinkCriteria As String
DoCmd.Openform "Report form 1", , , stLinkCriteria
End Sub
Thanks
Please help me with my current conversion problem from access 97 to
access 2003... we have this database which opens a file, it's basically
text but the file ext is *.1 or *.2...it uses MS Common Dialog 6.0...
Everything works on 97 but after I converted it to 2003... the program
doesn't seem to open the text files with .1 or .2 unless I change it to
..txt... I can't go on updating the files ext's because it would be a
hell lot of work.. so it would be great if someone have bright ideas to
help me overcome this problem... I'm thinking that the 2003 should be
more linient about ext's but isn't or maybe I'm just missing
something..Here';s the line of code I uses. It fails on the
lineoCmd.TransferText acImportFixed, "PROE EXPORT", _
"TBL_DATA", sfilename
Sub Openfile(sfilename)
Dim filetoopen As String
' Turn off Display of Warnings
DoCmd.SetWarnings False
' Delete Current Contents of Table
DoCmd.RunSQL "Delete From TBL_DATA"
DoCmd.OpenQuery "DeleteLoomInfo", acViewNormal, acEdit
' Import file using PROE EXPORT Specification
DoCmd.TransferText acImportFixed, "PROE EXPORT", _
"TBL_DATA", sfilename
' Delete unused records
DoCmd.OpenQuery "loadLoomToTable", acViewNormal, acEdit
DoCmd.OpenQuery "WW delete unused records", acNormal, acEdit
' Delete WWCCT Info
DoCmd.OpenQuery "WW CCTID Delete", acNormal, acEdit
' Append WWX and Y to CCTID table
DoCmd.OpenQuery "Append WWX", acNormal, acEdit
DoCmd.OpenQuery "Append WWY", acNormal, acEdit
' Turn on Display of Warnings
DoCmd.SetWarnings True
' Change Title and Export Label to Reflect Loaded Assembly Name
'filename = Left(sfilename, InStr(sfilename, ".")) +
CStr(Right(sfilename, Len(sfilename) - InStr(sfilename, ".")) + 1)
WWName = Right(sfilename, (Len(sfilename) - InStr(sfilename, ".") +
6))
'Open report form
Dim stLinkCriteria As String
DoCmd.Openform "Report form 1", , , stLinkCriteria
End Sub
Thanks