acSysCmdClearStatus

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi, all !

what does above command actually do ?

In a form, usually the statusbar text of the currentcontrol (as stated in
the controls properties) is shown. Sometimes I want to change the message
which I do by:

STATUShelp = SysCmd(acSysCmdSetStatus, "ANPASSUNG der Anzeige läuft . . .")

I end this statement by:

STATUShelp = SysCmd(acSysCmdClearStatus)

The message disappears, but instead of the current controls statusbar text
it shows just "ready". If I use then

DoCmd.SelectObject acForm, , True
DoCmd.SelectObject acForm, "REZeingabe"

it works properly. In fact, I leave the form and re-enter it. Is that
necessary ? Or is there a more elegant solution?

Help would be great.

ulrich1947
 
Ulrich1947 said:
hi, all !

what does above command actually do ?

In a form, usually the statusbar text of the currentcontrol (as
stated in the controls properties) is shown. Sometimes I want to
change the message which I do by:

STATUShelp = SysCmd(acSysCmdSetStatus, "ANPASSUNG der Anzeige läuft
. . .")

I end this statement by:

STATUShelp = SysCmd(acSysCmdClearStatus)

The message disappears, but instead of the current controls statusbar
text it shows just "ready". If I use then

DoCmd.SelectObject acForm, , True
DoCmd.SelectObject acForm, "REZeingabe"

it works properly. In fact, I leave the form and re-enter it. Is that
necessary ? Or is there a more elegant solution?

Help would be great.

ulrich1947


Are you sure the form and control both still have the focus at the time
you clear the status? I haven't been able to reproduce the problem in a
couple of quick tests.

You might try just setting the focus to the control:

STATUShelp = SysCmd(acSysCmdClearStatus)
Me!REZeingabe.SetFocus
 
Hi, and thanks for trying

However, unfortunately this does not help. Maybe I am missing a proper
focussing. Next I show you the complete lines:

DoCmd.Echo False
DoCmd.GoToControl "title"
allgKZalph2 = "QUELLE": allgKZnum3 = 5: OPTION02(21) = 5: OPTION01(13) = -1:
OPTION01(17) = -1: OPTION03(32) = -1: OPTION04(44) = -1
Call searchData
Me.DataEntry = False: HeadLine2.Caption = Kriterien2: Kriterien2 = ""
DoCmd.Echo True
STATUShelp = SysCmd(acSysCmdClearStatus)

Thereafter the procedure ends, going nowhere else (tested by stepwise action
F9/F8)

Going to the control "title" activates a tiny Enter-Event procedure incl. a
SetStatus command which is properly executed
Calling the procedure SearchData opens a PopUp Form, during which no
statement can be displayed.

When i alter the last command from ClearStatus to STATUShelp =
SysCmd(acSysCmdSetStatus, "aaawww") - just a nonsense entry - it works fine.
Setting focus before or after the ClearStatus command to the control "title"
makes no difference at all. By the way, "REZeingabe" is the name of the form,
one of its controls is named "title"

Even if there would be a problem by focussing proper, why then using the
ClearStatus command does not work either if putting it into the Enter-Event
of any next control I move to but always work on de-activate/activate the
form (whose FormActivate-Event, too, includes a SetStatus / ClearStatus
command - and works)? Any other idea? By the way, I use Access 2000 (9.0.4402
SR-1)

ulrich1947
 
Ulrich1947 said:
Hi, and thanks for trying

However, unfortunately this does not help. Maybe I am missing a proper
focussing. Next I show you the complete lines:

DoCmd.Echo False
DoCmd.GoToControl "title"
allgKZalph2 = "QUELLE": allgKZnum3 = 5: OPTION02(21) = 5:
OPTION01(13) = -1: OPTION01(17) = -1: OPTION03(32) = -1: OPTION04(44)
= -1
Call searchData
Me.DataEntry = False: HeadLine2.Caption = Kriterien2: Kriterien2 = ""
DoCmd.Echo True
STATUShelp = SysCmd(acSysCmdClearStatus)

Thereafter the procedure ends, going nowhere else (tested by stepwise
action F9/F8)

Going to the control "title" activates a tiny Enter-Event procedure
incl. a SetStatus command which is properly executed
Calling the procedure SearchData opens a PopUp Form, during which no
statement can be displayed.

When i alter the last command from ClearStatus to STATUShelp =
SysCmd(acSysCmdSetStatus, "aaawww") - just a nonsense entry - it
works fine. Setting focus before or after the ClearStatus command to
the control "title" makes no difference at all. By the way,
"REZeingabe" is the name of the form, one of its controls is named
"title"

Even if there would be a problem by focussing proper, why then using
the ClearStatus command does not work either if putting it into the
Enter-Event of any next control I move to but always work on
de-activate/activate the form (whose FormActivate-Event, too,
includes a SetStatus / ClearStatus command - and works)? Any other
idea? By the way, I use Access 2000 (9.0.4402 SR-1)

I've set up a simple test form to check this out, and it appears to be a
bug of some sort in Access 2000. In my test form, the following code
works in Access 2002 (resetting the status bar text to the StatusBarText
of the [Desc] control), but does not work in Access 2000:

'*** WORKS IN A2002, NOT IN A2000

DoCmd.Echo False
DoCmd.GoToControl "Desc"

DoCmd.OpenForm "frmPopup"
DoCmd.Close acForm, "frmPopup"

DoCmd.Echo True
SysCmd acSysCmdClearStatus

I tried activating the form with DoCmd.SelectObject, but it had no
effect. However, if I force Access to redraw the form by hiding and
reshowing it, it works in Access 2000:

'*** WORKS IN A2000

DoCmd.Echo False
DoCmd.GoToControl "Desc"

DoCmd.OpenForm "frmPopup"
DoCmd.Close acForm, "frmPopup"

' Force Access to redraw the form.
Me.Visible = False
Me.Visible = True

DoCmd.Echo True
SysCmd acSysCmdClearStatus

So I guess you can use that as a workaround, though it doesn't seem to
be necessary in Access 2002.
 

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

Back
Top