Refreshing data on a form after DoMenuItem - acImport call

G

Guest

My scenario is this: I open a form with several subforms in it. On each subform I have a button that fires a DoMenuItem event:
DoCmd.DoMenuItem acTable, acFile, acmdImport, acMenuVer70 - it allows the user to import data to a table from excel spreadsheets. I want to be able to run a Subform!Parent.Update after the import process has finished. It seems that the _click procedure of the buttom "import" finishes running the DoCmd and then it doesn't requery the data.
I could use some help,

Thanks
GB
 
N

Nick Coe \(UK\)

Try Me.Requery in your code just after the docmd.

--
Nick Coe (UK)
www.alphacos.co.uk

---

Gary said:
My scenario is this: I open a form with several subforms
in it. On each subform I have a button that fires a
DoMenuItem event:
DoCmd.DoMenuItem acTable, acFile, acmdImport,
acMenuVer70 - it allows the user to import data to a table
from excel spreadsheets. I want to be able to run a
Subform!Parent.Update after the import process has finished.
It seems that the _click procedure of the buttom "import"
finishes running the DoCmd and then it doesn't requery the
data.
 
G

Guest

Hi,
Thanks for the suggestion, I have already done that but It seems that it's not executing - When I click the button executes DoCmd and opens Access Import Table Dialog - after I finish I want to be able to update the form, but it doesn't run the Me!Requery statement.
 
N

Nick Coe \(UK\)

Yeah, I was clutching at straws a bit hoping for a simple
solution.

BTW what version are you using? acMenuVer70 implies
Access95 if I remember correctly, not that it won't work
necessarily, just curious.

I'll go and do a bit of research on this.

If anyone else wants to jump in, feel free.. :))

--
Nick Coe (UK)
www.alphacos.co.uk

---

GB said:
Hi,
Thanks for the suggestion, I have already done that but It
seems that it's not executing - When I click the button
executes DoCmd and opens Access Import Table Dialog - after
I finish I want to be able to update the form, but it
doesn't run the Me!Requery statement.
 

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