PDA

Click to See Complete Forum and Search --> : Problem with Access 97 VBA


JazzBass
Aug 17th, 1999, 01:24 PM
I posted this under my other post, but no one reponded to it. Please help.

I'm using to drop down combo boxes to allow the user to view all tables in a tablespace and another to select the Oracle Table Space he wants to export the table to
I'm getting a ODBC call failed error when I run this command. Here is my code

VBA in Office 97 (MS Access)

Private Sub Command2_Click()

'Variables

Dim TableSpace As String

Dim TableName As String


'Get whatever is selected in the combo boxes

Forms!Front!cblTableSpace.SetFocus
TableSpace = cblTableSpace.Text

Forms!Front!cblTableName.SetFocus
TableName = cblTableName.Text


'Doit
If TableSpace = "APPS" Then
TableSpace = "EAIAPPS"

DoCmd.TransferDatabase (acExport)_ ("ODBCDatabase"), ("ODBC;DSN=Oracle8;UID=")_
& TableSpace & ";" &_ "PWD=APPS;LAUGUAGE=us_english;DATABASE="_
& TableName & """"), (acTable), (TableName)_ ,(TableName), True, True

Endif
Exit sub


I think something has to do with how I'm including the 2 variables in my command.
The reason I have those variables is to let the user select the table and then select the
tablespace he wants to export it to.

I've spent the last 3-4 hours trying to run this thing a number of different ways (with out the paraintases) spelling??? and adding different number of quotes.

Please help
Thanks,
JazzBass

------------------
Beginner VB Programmer