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

type mismatch?

Status
Not open for further replies.

zhongwei

Programmer
Jan 25, 2002
30
CA
I'm writing code to copy a table(named table1) to another database(C:\db8.mdb),and new table's name equal to variable T
the coding is like:
Dim T
T = "1234"
DoCmd.CopyObject "c:\db8.mdb", t, "acTable", "table1"
every time I run it the error message pop up saying"type mismatch".I check the instruction of Docmd.copy everything looks ok,Where is the problem?

Any reply will be greatly appreciated.
 
zhong,
acTable is a Constant, don't use quotes around it, that should do it.
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top