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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link Table

Status
Not open for further replies.

vr

Programmer
Oct 14, 1999
54
US
I would like to link an oracle table in the on_load event of a form and then delete the link on the unload event.

Does anyone have any samples?

I am currently using:
ON_LOAD
Dim dbsCurrent As Database
Dim tdfLinked As TableDef
Dim tdf As TableDef

DoCmd.Hourglass True

Set dbsCurrent = CurrentDb()

Set tdfLinked = dbsCurrent.CreateTableDef("Channel")
tdfLinked.Connect = "ODBC;DATABASE=XXXX;UID=XXXX;PWD=XXXX;DSN=XXXX"
tdfLinked.SourceTableName = "Claims.Channel"
dbsCurrent.TableDefs.Append tdfLinked
tdfLinked.Attributes = dbHiddenObject

UNLOAD:
DoCmd.DeleteObject acTable, "Channel"

I then display some of the table information on the form.

The problem: Sometimes the information displays and sometimes it doesn't.

Would appreciate any assistance. Thanks!
 
try this as a test, rem out the Unload

UNLOAD:
' DoCmd.DeleteObject acTable, "Channel"

DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top