Here's the situation:
User can type into a Enter Company Name combobox. If there's a match, the match is displayed. If there isn't a match, a NotInList event asks them if they want to add a new company.
So far, so good.
If they say yes, frm_companies opens using DoCmd.OpenForm "frm_companies", , , , acFromAdd, acDialog.
I also use frm_companies for data entry and viewing, and as it has subforms and sub-subforms, I'm trying to not have to recreate it. But if it's opened modally like this, I'd like to hide certain controls that really only apply to viewing and editing.
Is there a way to test if the form is open modally, so I can set those controls' .visible to false?
I tried searching the web, and one found one case where someone was trying to do something similar. So I suspect the answer is no, or at least not easily, and that the easiest solution is just to create a new form, but I thought I'd see if anyone had ideas.
Thanks
User can type into a Enter Company Name combobox. If there's a match, the match is displayed. If there isn't a match, a NotInList event asks them if they want to add a new company.
So far, so good.
If they say yes, frm_companies opens using DoCmd.OpenForm "frm_companies", , , , acFromAdd, acDialog.
I also use frm_companies for data entry and viewing, and as it has subforms and sub-subforms, I'm trying to not have to recreate it. But if it's opened modally like this, I'd like to hide certain controls that really only apply to viewing and editing.
Is there a way to test if the form is open modally, so I can set those controls' .visible to false?
I tried searching the web, and one found one case where someone was trying to do something similar. So I suspect the answer is no, or at least not easily, and that the easiest solution is just to create a new form, but I thought I'd see if anyone had ideas.
Thanks