dxp
Registered User.
- Local time
- Today, 16:05
- Joined
- Jun 5, 2006
- Messages
- 62
Can anyone help with this code please. I keep getting Error 13, type mismatch on the on click event of a Command button.
Private Sub Command6_Click ()
Dim tmpFilePath AS String
tmpFilePath = Me!Text1
DoCmd.DeleteObject acTable, "Expire"
DoCmd. TransferDatabase_ acImport,"MicrosoftAccess",acTable,"tmpFilePath","Expire","Expire",False
End Sub
What I am trying to do is delete a table and replace it with a table of the same name in another db. the path to the file is stored in Text1. The delete part works OK then the error message arrives, when I run it with a static file path it worked ok, but I want to pick up the path stored in Text1 on my form.
Thanks for your help
Private Sub Command6_Click ()
Dim tmpFilePath AS String
tmpFilePath = Me!Text1
DoCmd.DeleteObject acTable, "Expire"
DoCmd. TransferDatabase_ acImport,"MicrosoftAccess",acTable,"tmpFilePath","Expire","Expire",False
End Sub
What I am trying to do is delete a table and replace it with a table of the same name in another db. the path to the file is stored in Text1. The delete part works OK then the error message arrives, when I run it with a static file path it worked ok, but I want to pick up the path stored in Text1 on my form.
Thanks for your help