Switching of messages

  • Thread starter Thread starter Tony Williams
  • Start date Start date
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
 
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
 
Thanks Tina but as I mentioned in my post I had tried that and it didn't stop
the message?
Tony
 
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
 
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
 
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
 
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
 
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.
 
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.
 
Back
Top