Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

houston, we have a problem!

Status
Not open for further replies.

goldwhispers

Programmer
Jun 21, 2000
123
ZA
ok this is my code

actually this is not the problem at all.... (the cc being set to an object)

the system is converting it to a #, ive changed the code like this



Sub IMNew()
Dim cc As String
Dim rs As DAO.Recordset
Dim bb As String

cc = "ABA"
Set rs = CurrentDb.OpenRecordset("SELECT TableName from ABA ")
', dbOpenSnapshot, dbSeeChanges)
Do Until rs.EOF
aa = rs!TableName


DoCmd.TransferDatabase acImport, "ODBC Database", _
"ODBC;DSN=FM_AVAF;UID=author;PWD=analyst;LANGUAGE=us_english;" _
& "DATABASE=FM_ABA", acTable, aa, aa

DoCmd.TransferText acExportDelim, , aa, "J:\external\FIM\IM\ABA\FIN" & Chr(46) & cc & aa & ".csv", True
Dim dbs As Database
Set dbs = CurrentDb()
dbs.Execute "drop table " & aa

rs.MoveNext
Loop

dbs.Close
rs.Close

the problem is chr(46) = . , now whether i put a . or chr(46) it returns a #. If i put any other character in its fine, someone help, why is this happening...i am doing this in VBA in access...
 
Why not use "J:\external\FIM\IM\ABA\FIN." & cc & aa & ".csv"? Just put the period within the quotes, instead of using the Chr(46).
 
Then the problem is obviously not the Chr(46). The # symbol is likely in your aa or cc variable. Have you checked those?
 
You will probably get more answers if you post in the right forum! This is the VB6 forum. I suggest VBA for Access is probably best asked in forum705. You should also read faq222-2244 which gives guidelines on getting the best from the forum, and how to recognise helpful answers.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top