Toolbar Hell !?!

G

Guest

My application has a custom print toolbar. Somehow, in the application I'm
working on now, it's appearing on other forms instead of just reports. How do
I get rid of it?

Also, whenever I press the printer icon on this toolbar I get a message 'the
expression you entered has a function name that cant be found'.
Does anyone have a clue as to what this means? I've gone over all the code
and can find nothing wrong. This is wasting hours of my time and driving me
nuts!

This all works perfectly in other applicatiions where I have used the same
toolbar.
There appears to be NO documentation on toolbars in any HELP screen I've
found.
 
A

AccessVandal via AccessMonster.com

Hi,

why the multiple posting?

Here's from Access Help.

Startup Properties Example

The following example shows a procedure named SetStartupProperties that
passes the name of the property to be set, its data type, and its desired
setting. The general purpose procedure ChangeProperty attempts to set the
startup property and, if the property isn't found, uses the CreateProperty
method to append it to the Properties collection. This is necessary because
these properties don't appear in the Properties collection until they've been
set or changed at least once.

Sub SetStartupProperties()
Const DB_Text As Long = 10
Const DB_Boolean As Long = 1
ChangeProperty "StartupForm", DB_Text, "Customers"
ChangeProperty "StartupShowDBWindow", DB_Boolean, False
ChangeProperty "StartupShowStatusBar", DB_Boolean, False
ChangeProperty "AllowBuiltinToolbars", DB_Boolean, False
ChangeProperty "AllowFullMenus", DB_Boolean, True
ChangeProperty "AllowBreakIntoCode", DB_Boolean, False
ChangeProperty "AllowSpecialKeys", DB_Boolean, True
ChangeProperty "AllowBypassKey", DB_Boolean, True
End Sub

Function ChangeProperty(strPropName As String, varPropType As Variant,
varPropValue As Variant) As Integer
Dim dbs As Object, prp As Variant
Const conPropNotFoundError = 3270

Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True

Change_Bye:
Exit Function

Change_Err:
If Err = conPropNotFoundError Then ' Property not found.
Set prp = dbs.CreateProperty(strPropName, _
varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume Change_Bye
End If
End Function
 
S

Steve

The custom Print toolbar must be a menubar rather than a toolbar. Make sure
that under Tools - Startup - Menubar you don't have the custom print menubar
selected. Open each report in design view, open Properties, go to the Other
tab and select the custom print menubar in the Menubar property.

......function name that cant be found'.
Check two things:
1. Check what is in the Action property of the button. It must gegin with
"=" and the name of the function must end with "()"
2. Since you want the custom print menubar for multiple reports, the print
function must me in a standard module and must be Public. That is:
Public Function CustomPrint()

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
B

Bob Quintal

The custom Print toolbar must be a menubar rather than a
toolbar. Make sure that under Tools - Startup - Menubar you
don't have the custom print menubar selected. Open each report
in design view, open Properties, go to the Other tab and
select the custom print menubar in the Menubar property.
Why do you claim that a toolbar must be a menubar? There is a
property on the Properties->Other->toolbar popup that allows
associating a toolbar to a report, and it works in every version
of Access I've used.

Q

.....function name that cant be found'.
Check two things:
1. Check what is in the Action property of the button. It
must gegin with "=" and the name of the function must end with
"()" 2. Since you want the custom print menubar for multiple
reports, the print function must me in a standard module and
must be Public. That is: Public Function CustomPrint()

PC Datasheet
 

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