Connecting Tech Pros Worldwide Help | Site Map

Testing for mode form was opened in

JSMiami
Guest
 
Posts: n/a
#1: Nov 12 '05
The switchboard has a way of opening forms in either Add mode or in
Edit mode. Is there anyway of testing for that mode in VB code? If not
is there a way of testing (within a subform) if there is a parent?

Thanks
Terry Kreft
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Testing for mode form was opened in


1) Check the DataEntry Property of the form

2) Look at the parent property, if a form obkject is a subform then its
..Parent property will return an object, if it isn't then referring to its
..Parent property will return a trappable error (2452)

--
Terry Kreft
MVP Microsoft Access


"JSMiami" <jsalama@unete.com> wrote in message
news:445308f1.0404210812.17ec95ae@posting.google.c om...[color=blue]
> The switchboard has a way of opening forms in either Add mode or in
> Edit mode. Is there anyway of testing for that mode in VB code? If not
> is there a way of testing (within a subform) if there is a parent?
>
> Thanks[/color]


Dave Perry
Guest
 
Posts: n/a
#3: Nov 12 '05

re: Testing for mode form was opened in


jsalama@unete.com (JSMiami) wrote in message news:<445308f1.0404210812.17ec95ae@posting.google. com>...[color=blue]
> The switchboard has a way of opening forms in either Add mode or in
> Edit mode. Is there anyway of testing for that mode in VB code? If not
> is there a way of testing (within a subform) if there is a parent?
>
> Thanks[/color]

JSMiami,

You may want to take a look at SysCmd function and the
acSysCmdGetObjectState argument, with a very good article at:

http://builder.com.com/5100-6386-5069824.html

-dp
Closed Thread