Balloon issues

B

bigomega73

I've tried all the examples in the Microsoft help file and I can't seem to
get a balloon to show up on my form at all. I've attached the following code
to the OnGotFocus event of a control:

With Assistant.NewBalloon
.Heading = "Notes"
.Text = "Double Click to enter Notes"
.Show
End With

Can anyone help me with what I am doing wrong? I get no error, but the
balloon just doesn't show up.

Thank you!
 
C

Clif McIrvin

bigomega73 said:
I've tried all the examples in the Microsoft help file and I can't
seem to
get a balloon to show up on my form at all.

Access 2003: I was quite frustrated trying to research using a balloon,
and ended up just trying things. I've tweaked my code somewhat since
the beginning, and among other things have added logic to set a switch
so that sometimes the balloon appears and sometimes it doesn't depending
on data elsewhere on the form. The test I was applying caused problems
on an empty dataset, hence my test for .BOF in the _Enter procedure
(commented out in this sample.)

I seem to recall that I experienced other strange behavior if I failed
to close the balloon when closing the form; and attempting to close a
non-existant balloon also caused problems, hence my use of the .Private
property.

Good Luck!

Here's the code I use:

Option Compare Database

Const lTrue = -1& 'Long True
Const lFalse = 0& 'Long False

Public myBalloon As Balloon
' myBalloon.Private is used as a Visible True / False Property

Private Sub Form_Load()
With Assistant
.On = True
.Visible = False
End With

Set myBalloon = Assistant.NewBalloon
myBalloon.Close
myBalloon.Private = lFalse 'Not Visible (False as Long)
End Sub

Private Sub Form_Unload(Cancel As Integer)
Set myBalloon = Nothing
With Assistant
.Visible = False
.On = False
End With
End Sub

Private Sub LastName_Enter()

'If Me.Recordset.BOF Then 'skip all if empty recordset
'ElseIf (any_other_condition_to_test) = True Then
With myBalloon
.Text = "Data Entry Instructions go here."
.Mode = msoModeModeless
.Button = msoButtonSetNone
.Show
.Private = lTrue 'Visible (True as Long)
End With
'End If
End Sub

Private Sub LastName_Exit(Cancel As Integer)
With myBalloon
If .Private = lTrue Then
.Close
.Private = lFalse 'Not Visible (False as Long)
End If
End With
End Sub

HTH
 
B

bigomega73

Hi Clif. Thanks for the reply.

I tried entering the code, but when I load the form I keep getting the error
message:

Run-time error '-2147467259 (80004005_':

Method 'On' of object 'Assistant' failed
 
C

Clif McIrvin

bigomega73 said:
Hi Clif. Thanks for the reply.

I tried entering the code, but when I load the form I keep getting the
error
message:

Run-time error '-2147467259 (80004005_':

Method 'On' of object 'Assistant' failed

first off, what version of Access are you running? I've only had
experience w/ 2003 & don't know if there will be differences in other
versions.

Does your office assistant work at all?

check your assistant options:

From the menu bar choose Help | Show Office Assistant

Click on the Assistant balloon, click on Options and under the options
tab make sure "Use Office Assistant" is checked.

That's pretty much all i can think of -- if that doesn't get you going
maybe someone else will speak up.

A couple more thoughts to add to my original reply:

At least in A2203, the help files on office assistant are difficult to
make sense of (at least I thought so starting out!) but they do supply
accurate information. Go to the table of contents and read everything
you can find on using the office assistant.

Also, even though the example code I sent uses a string literal for the
balloon message, I actually use the Table Design field description
property for my balloon text: Instead of

.Text = "Data Entry Instructions go here."

I use

.Text = Me![MyFieldName].StatusBarText


HTH
--Clif
 
B

bigomega73

Yes, you were right. I didn't have the Office Assistant turned on. I didn't
realize that that was what was meant by a "balloon". I was hoping it more
along the lines of a help tip type of balloon that would hover over a field
that it was attached to. Since the office assistant is not installed on most
of the computers in my office, it would be useless to utilize it in my case.

Thank you very much for your help though, Clif!

Clif McIrvin said:
bigomega73 said:
Hi Clif. Thanks for the reply.

I tried entering the code, but when I load the form I keep getting the
error
message:

Run-time error '-2147467259 (80004005_':

Method 'On' of object 'Assistant' failed

first off, what version of Access are you running? I've only had
experience w/ 2003 & don't know if there will be differences in other
versions.

Does your office assistant work at all?

check your assistant options:

From the menu bar choose Help | Show Office Assistant

Click on the Assistant balloon, click on Options and under the options
tab make sure "Use Office Assistant" is checked.

That's pretty much all i can think of -- if that doesn't get you going
maybe someone else will speak up.

A couple more thoughts to add to my original reply:

At least in A2203, the help files on office assistant are difficult to
make sense of (at least I thought so starting out!) but they do supply
accurate information. Go to the table of contents and read everything
you can find on using the office assistant.

Also, even though the example code I sent uses a string literal for the
balloon message, I actually use the Table Design field description
property for my balloon text: Instead of

.Text = "Data Entry Instructions go here."

I use

.Text = Me![MyFieldName].StatusBarText


HTH
--Clif
 
C

Clif McIrvin

bigomega73 said:
Yes, you were right. I didn't have the Office Assistant turned on. I
didn't
realize that that was what was meant by a "balloon". I was hoping it
more
along the lines of a help tip type of balloon that would hover over a
field
that it was attached to. Since the office assistant is not installed
on most
of the computers in my office, it would be useless to utilize it in my
case.

Thank you very much for your help though, Clif!
<previous posts snipped>

In that case, check out the "ControlTip Text" property of the form
controls. In the forms control property sheet it's under the "Other"
tab.

When you "hover" over the control the ControlTip Text appears in the
familiar screen tip format. If you need multi-line text in the screen
tip you can insert chr$(13) (or vbCR, I believe) in your text string.

Search the discussion archives on Google Groups for "Screen Tip" and
"Tool Tip" for more discussion.

Good Luck!
 

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

Top