Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stop "form view" in status bar 2

Status
Not open for further replies.

judgehopkins

Technical User
Mar 23, 2003
780
US
I noticed that when an ActiveX calendar or a custom-made message box pops up in Access 2000, that the status bar says "form view".

Is there any way to stop this behavior (other than cutting off the display of the status bar)?

Judge Hopkins


There are only two rules for success: (1) Never tell everything you know.
 
You can set focus on a button by setting the tab order to 0. Then change the Status Bar Text in the properties window for that button to what you want the status bar to say. When your custom message box opens it will display the Status Bar Text that's set on the button. This is assuming your custom message box has an Okay or some other button.
 
Actually here's a better way. Type the following in the forms On Open Event:

Dim RetVal
RetVal = SysCmd(4, "Text you want in the status bar...")

Hope this helps.
 
humbleprogrammer,

Thanks!

That works...except for one thing: when the focus moves to the next control, the message stays.

The form I want to put the status text on is a form with an ActiveX calendar in it. I am not sure why, but there is no place in the forms property sheet for status bar text.

There is a status bar text entry on my main form.

Puzzling....[reading]....I've done a lot of research but can't figure that one out!

Judge Hopkins


There are only two rules for success: (1) Never tell everything you know.
 
Hi Judge

Place the following code in the forms On Close event:

RetVal = SysCmd(5)

This will clear out the status bar message that is set when the form opens. This way, when you open other forms, you won't be stuck with the same message.

So the On Open event would be:

Dim RetVal
RetVal = SysCmd(4, "Text you want in the status bar...")

and On Close would be:
RetVal = SysCmd(5)

Let me know if this works for you.

 
Hi judge, that's a bit pedantic, humbleprogrammer displayed the need for declaring (dim) variables in procedures a few posts back. Isn't the law profession consistent or is that a silly question?

Jane.

A star 4 u humbleprogrammer.
 
Yes, it is a bit pedantic. But that's one of the nicest things I have been called!

[bigsmile]

"Isn't the law profession consistent or is that a silly question?"

That's not a silly question. The law profession is [red]not consistent[/red] as far as I have been able to tell...but I've only been at it for 35 years, so it's a bit early to tell.

One more question:

[blue]The code humbleprogrammer provided does not work on a form where a query is performed, even though I followed his instructions to the letter.

I see the message "Calculating..." in the status bar and then when it finishes, I see "Form view" in the status bar rather than "my text".[/blue]

Any ideas?



Judge Hopkins


There are only two rules for success: (1) Never tell everything you know.
 
How is the query being run in the form? Is it the data source or do you have a button that runs its?
 
SELECT tblPayments.OrderID AS Ref, tblCompany.CompanyName AS Name, tblPayments.PaymentDate AS Date_Paid, tblPayments.PaymentAmount AS Amount, tblPayments.PaymentType AS Method
ORDER BY tblPayments.OrderID DESC;


I have buttons on the form that runs the query above.

Judge Hopkins


There are only two rules for success: (1) Never tell everything you know.
 
I tested it out on my end and the RetVal text is still displaying after my query runs. Maybe theres something in your button (just guessing). Try putting the SysCmd(4, "Text you want in the status bar...") in the buttons Got Focus or Lost Focus event.
 
No, sorry. None of that works!

I have a calendar form and your code worked great on that.

The search form, however, must be doing something to the system commands that I can't figure out.

Judge Hopkins


There are only two rules for success: (1) Never tell everything you know.
 
Okay, so I'm pedantic and did not realize the solution because it was too simple!

Put the status bar text on the command button that calls the form and it works!

But, humbleprogrammer, you gave me a good tool for my kit.

Thanks!

[hammer]

Judge Hopkins


There are only two rules for success: (1) Never tell everything you know.
 
hi
im having a problem.
i have a main form and a subform within that main form. the main form's data is edited from another form. The table being used is the same table in both cases, however on opening the form with the main form, the status bar reads 'calculating...' and the mouse is jumping like crazy until i select data from the main form which updates data in the subform.

Can u help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top