Switching of messages

T

Tony Williams

Is there any way to switch of the message that confirms the import of records
is finshed when using the import wizard. I have a routine that imports data
using the wizard then adds additional data with a query and I want to stop
the message appearing in case the user thinks the routine has finished. I
have my own progress meter that pops up and says when the whole routine is
finished. I've looked in tools ->options and tried setting
docmd.setwarnings.false but none of these work.
Thanks
Tony
 
T

tina

try

DoCmd.SetWarnings False
<your code that imports the data>
DoCmd.SetWarnings True

make sure you include the last line of code, that turns action warnings for
the database back on.

hth
 
T

Tony Williams

Thanks Tina but as I mentioned in my post I had tried that and it didn't stop
the message?
Tony
 
T

tina

sorry, i missed that bit. i wouldn't think that setting the Warnings
property in code would get a differnt result than going through Tools |
Options, but you might give it a try anyway. if it doesn't work from the
code, suggest you post your code, including the import code. perhaps there's
some issue there, because i routinely run imports using the SetWarnings
command before and after the TransferText function, and have had no problem
suppressing the warning message.

hth
 
T

Tony Williams

Hi Tina
Here's the code I'm using:
Private Sub cmdimport_Click()
On Error GoTo Err_cmdimport_Click
DoCmd.SetWarnings False
'Start meter
Call acbInitMeter("Importing File", True)
'Start import wizard
DoCmd.RunCommand acCmdImport
'Change meter
variable = acbUpdateMeter(50)
'Allocate reference numbers
Call fRenumber
Change meter
variable = acbUpdateMeter(100)
'Call acbCloseMeter
DoCmd.SetWarnings True
Exit_cmdimport_Click:
Exit Sub

Err_cmdimport_Click:
MsgBox Err.Description
Resume Exit_cmdimport_Click
End Sub

The "finished import" message still appears.
Any ideas?
Thanks a lot, really appreciate you looking at this with me.
Tony
 
T

tina

each time you run the import, is the data in the same format? if so, suggest
you try saving an Import specification, and using that to automate the
import, rather than opening the Import Wizard every time.

hth
 
T

Tony Williams

Hi Tina. The reason I'm using the import wizard is because the imports may
not all be the same and the wizard gives us greater flexibilty in importing
file types and omitting unwanted fields.
Looks like I'm stuck with the finished message?
Tony
 
T

tina

well, i think so, since you're essentially doing a manual import. but you
could try posting again, Tony, perhaps in both .externaldata and in
..modulesdaovba ngs (do a cross-post, don't multi-post!); give a synopsis of
the ground we covered, so you don't go thru the same Q & A again. perhaps
somebody else can help. good luck with it.
 
T

Tony Williams

Thanks Tina
Tony

tina said:
well, i think so, since you're essentially doing a manual import. but you
could try posting again, Tony, perhaps in both .externaldata and in
..modulesdaovba ngs (do a cross-post, don't multi-post!); give a synopsis of
the ground we covered, so you don't go thru the same Q & A again. perhaps
somebody else can help. good luck with it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top