|
 |
access thread: Detect Mode
Message #1 by "George Oro" <george@c...> on Tue, 26 Nov 2002 11:21:57 +0400
|
|
Hi Guys,
I have a data entry form frmA opens from frmB in New Mode and open in frmC as View Mode (return all records). How can I detect if my
data entry form frmA is on new mode or view mode without using any flag?
For Example:
OnLoad or OnOpen or OnCurrent
If frmA in New Mode then
do this....
Else
do this...
End If
Any tips is highly appreciated...
TIA,
George
Message #2 by "George Oro" <george@c...> on Tue, 26 Nov 2002 11:38:55 +0400
|
|
NO WORRIES GUYS, I SOLVED IT!
If Me.NewRecord then
Thanks to me ;)
-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Tuesday, November 26, 2002 11:22 AM
To: Access
Subject: [access] Detect Mode
Hi Guys,
I have a data entry form frmA opens from frmB in New Mode and open in frmC as View Mode (return all records). How can I detect if my
data entry form frmA is on new mode or view mode without using any flag?
For Example:
OnLoad or OnOpen or OnCurrent
If frmA in New Mode then
do this....
Else
do this...
End If
Any tips is highly appreciated...
TIA,
George
Message #3 by "Derrick Flores" <derrickflores@s...> on Thu, 28 Nov 2002 00:46:39 -0600
|
|
George,
What you can do is create a Global variable (I usally use a boolean) in a
Module.
Example:
Public blnNewRec as Boolean
Then you can check against the global variable when a form loads.
Example:
In frmA you would do something like this:
blnNewRec = True
DoCmd.OpenForm "frmFormB"
In the other form you would check against the variable when the form is
loaded.
If blnNewRec = True then
msgbox "New Mode"
Else
msgbxo "Not In New Mode"
End if
Good Luck,
Derrick Flores
San Antonio, Texas
----- Original Message -----
From: "George Oro" <george@c...>
To: "Access" <access@p...>
Sent: Tuesday, November 26, 2002 1:21 AM
Subject: [access] Detect Mode
> Hi Guys,
>
> I have a data entry form frmA opens from frmB in New Mode and open in frmC
as View Mode (return all records). How can I detect if my
> data entry form frmA is on new mode or view mode without using any flag?
>
> For Example:
> OnLoad or OnOpen or OnCurrent
> If frmA in New Mode then
> do this....
> Else
> do this...
> End If
>
> Any tips is highly appreciated...
>
> TIA,
> George
>
>
>
|
|
 |