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

Cmd to open AddTable Dialog (A2K/SQL Server)

Status
Not open for further replies.

JeremyNYC

Programmer
Sep 23, 2002
2,688
0
0
US
Anyone know how we can open the add table dialog in an Access 2000 ADP that's using a SQL Server back end?

We've got the toolbars and menus locked down and are using custom ones. When they open a view in design view (via a query manager form), we run code to show the correct menu and toolbar. The one thing we haven't been able to do is open the "AddTable" dialog in Access 2000. In later
version we can use

DoCmd.RunCommand acCmdTableAddTable

But that wasn't introduced until Access XP, according to

Here's what we're trying to do:
If SysCmd(acSysCmdAccessVer) = "9.0" Then
call DoCmd.RunCommand ([whatever this is])
'Or anything else that will get the job done
Else
call DoCmd.RunCommand (acCmdTableAddTable)
End If

In an mdb using a Jet back end (any version from 2K on), I can do call DoCmd.RunCommand (acCmdShowTable)

but in the adp, with the connection to SQL Server, that doesn't work--it's a different dialog box. The new command (acCmdTableAddTable) works great in XP and 2003, but doesn't compile in 2000.

Any thoughts?

---
Jeremy Wallace
METRIX Lead Developer
Fund for the City of New York
http:// metrix . fcny . org
 
try Call DoCmd.RunCommand(acCmdNewObjectTable)


Randall Vollen
National City Bank Corp.
 
Randall,

Thanks. That, unfortunately, creates a new table, which is not what I want. I just want to add an existing table to a query.

Jeremy

---
Jeremy Wallace
METRIX Lead Developer
Fund for the City of New York
http:// metrix . fcny . org
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top