Nancythomas
Registered User.
- Local time
- Yesterday, 16:05
- Joined
- Apr 20, 2010
- Messages
- 59
Hi
I have a VB Script by a command button
(1) It imports data from a spread sheet into a Temp Table
(2) Closes the Temp Table after import and
(3) Opens a form to review the data before uploading it into the master table.
On Clicking the command Button the form opens in a flash and disappears.
How can I have the form open.
Not sure where it is incorrect in the script.
Here is the script:
Private Sub cmdUploadDate_Click()
DoCmd.SetWarnings False
If MsgBox("Do you want to Import the new data ?", vbYesNo, "title") = vbYes Then
DoCmd.TransferSpreadsheet acImport, , _
"TmpTable", FilePath.Value, True, ""
DoCmd.Close acTable, "TmpTable"
DoCmd.OpenForm "frmFIXUPTEMPTABLE", acNormal
End If
DoCmd.SetWarnings True
DoCmd.Close
Exit_CloseForm_Click:
Exit Sub
End Sub
I have a VB Script by a command button
(1) It imports data from a spread sheet into a Temp Table
(2) Closes the Temp Table after import and
(3) Opens a form to review the data before uploading it into the master table.
On Clicking the command Button the form opens in a flash and disappears.
How can I have the form open.
Not sure where it is incorrect in the script.
Here is the script:
Private Sub cmdUploadDate_Click()
DoCmd.SetWarnings False
If MsgBox("Do you want to Import the new data ?", vbYesNo, "title") = vbYes Then
DoCmd.TransferSpreadsheet acImport, , _
"TmpTable", FilePath.Value, True, ""
DoCmd.Close acTable, "TmpTable"
DoCmd.OpenForm "frmFIXUPTEMPTABLE", acNormal
End If
DoCmd.SetWarnings True
DoCmd.Close
Exit_CloseForm_Click:
Exit Sub
End Sub