473,326 Members | 2,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Import window error message missing

19
I am using Access 2007. In Access 2003, when you had the import window opened and clicked on the Cancel button, MS displayed an error message. To compensate for this using VB code, I used the "On Error" function because I am opening the Import window using VB code. I want to code to do something if the user clicks on the cancel button.

Code:

On Error Goto Opps2
DoCmd.RunCommand acCmdImportAttachText
Msgbox "File Imported! ", vbInformation + vbOkOnly, "BegProcessMsg3"


Opps2:
Msgbox "Import Canceled! ", vbInformation + vbOkOnly, "BegProcessErrMsg2"
Goto End1

End1:
End Function

Question: Does anyone know how to fix this issue. If the Import cancel button no longer generates an error, how do you program a custom message when the cancel button is clicked.
May 13 '08 #1
3 2053
FishVal
2,653 Expert 2GB
Hi, Reedsp.

You may try to check whether records were added or new table was created after import wizard finishes. BTW, Access2003 throws the error only when OpenFile dialog is canceled, if cancel is clicked while the wizard runs then VBA code execution proceeds silently.

Regards,
Fish
May 13 '08 #2
Reedsp
19
Records are imported into a existing table. But the cancel button is being clicked before the import wizard even gets to that point. In Access2003, the import window threw a error when you clicked the cancel button at any point in the wizard. In Access 2007, is seems like this is not occuring that no error is generated. Access 2007 accepts the cancel button and moves on to the next line of code. If this is true, how would you program around this issue so your code will not continue?

Thanks, ReedSP
May 20 '08 #3
FishVal
2,653 Expert 2GB
Records are imported into a existing table.
So, why not to compare records count before and after import?

But the cancel button is being clicked before the import wizard even gets to that point. In Access2003, the import window threw a error when you clicked the cancel button at any point in the wizard. In Access 2007, is seems like this is not occuring that no error is generated. Access 2007 accepts the cancel button and moves on to the next line of code.
I've checked that in Access 2003. It throws an error only when initial OpenFile dialog was cancelled. When user clicks cancel in wizard dialogs code execution proceeds silently.

Regards,
Fish
May 20 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Justin Koivisto | last post by:
Is there a way to create an alert-like message box that uses a custom image? Basically, I want to replace the default ! image with something else. -- Justin Koivisto - spam@koivi.com PHP...
4
by: Iain A. Mcleod | last post by:
Hi I'm stuck with the following schema validation problem in VS.NET 2003: I have two types of xml document and related schema: project and projectCollection. A projectcollection is just a set...
1
by: mark | last post by:
In Access 2000 and 2002, I have created an import specification to import the fixed-width recordset below into an existing table. I am having strange problems with the import of the date and time...
1
by: Dan | last post by:
Could someone please help me with auto importing a series of data files into an Access table. I tried to follow code given below in a previous messagebut i'm getting error messages. Here's my...
9
by: Mark | last post by:
Hi All, I am trying to use the function found on the MVP site http://www.mvps.org/access/api/api0019.htm to hide the Access window. I must be missing something as I keep getting an error message:...
0
by: maxim mat | last post by:
Hi I need to build client for web service. But when I'm using Visual Studio .NET to add Web Reference, I get error: "Custom tool error: Unable to import WebService/Schema. Unable to import...
2
by: Carmit | last post by:
Hi, I'm trying to build a proxy for this webservice: http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/EndTransactionLLSRQ.wsdl I'm getting the following error: Error: Unable to import...
0
by: John Jenkins | last post by:
Hi, any help on this would be greatly apprciated. I have been given a wsdl file from a customer generated by Oracle 10g Web Services tools. When I use wsdl.exe to attempt to produce proxy classes I...
6
by: Hemant Shah | last post by:
Folks, Today, I was exporting a table in one database and then importing it in another database. The table in destination database was missing one column (my mistake while creating the table),...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.