access 2010 suspend VBA code until a table has been closed
- Subscribe
- Subscribe to RSS feed
You can't do that with a table.
Instead of opening a table, open a form based on the table using DoCmd.OpenForm, and specify WindowMode:=acDialog:
DoCmd.OpenForm FormName:="frmCloneTheseFields", WindowMode:=acDialog
The code will pause until the user closes the form.
Kind regards, HansV
https://www.eileenslounge.com
1 person found this reply helpful
·Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
I got it working but it only shows one record at a time. Can I get "frmCloneTheseFields" to open in datasheet mode?
Regards
BarryGC
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Yes, you can specify the view:
DoCmd.OpenForm FormName:="frmCloneTheseFields", WindowMode:=acDialog, View:=acFormDS
Kind regards, HansV
https://www.eileenslounge.com
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Actually, datasheet forms do NOT open in dialog. You have to use a continues form that "looks" like a data sheet. If you "must" use a datasheet, then you have to drop it into a form as a sub form and launch that main form with the DS as a sub form.
If you don't want to have to use two forms (form + sub form datasheet), then you can use one continues form that looks much like a data sheet.
So DS cannot be opened as dialog forms.
Best regards,
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Kind regards, HansV
https://www.eileenslounge.com
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Question Info
Last updated February 12, 2018 Views 778 Applies to: