Display Document tabs

Gkirkup

Registered User.
Local time
Yesterday, 21:18
Joined
Mar 6, 2007
Messages
628
Some of my users run the program with 'Display Document Tabs' set, and some do not. I can identify those users that do. They lose this setting every time I send over an update. Is there a way to set 'Display Document Tabs' under program control?

Robert
 
Excellent! Now, if I want that to be set one time while the program is running, where do I put the code?

Robert
 
Ranman: I ran the code, but I got an error message on 'Call SetPropertyDAO'. The error message was 'Sub or function not defined'.
What do I need to do to define the function? Is there a library setting?

Robert
 
Ginawhip: OK, I created the module and that seems to be fine. But now I am getting an error message on SetPropertyDAO(db, on the db. The error message is ByReg Argument type mismatch.
So presumably I have to declare db. What do I declare it as?

Robert
 
What did you name the Module? And, you put it in it's own Module correct? (Not the one behind the Form.)
 
Yes, I created a new module called GKDAO, and in that module I put Function SetPropertyDAO, and Public Function HasProperty, as that is called by the first function.
My problem appears to be with 'db' in my call to SetPropertyDAO. Don't I need to declare db somewhere?

Robert
 
You should not... Please post the first line of the Function here.
 
Function SetPropertyDAO(obj As Object, strPropertyName As String, intType As Integer, _
varValue As Variant, Optional strErrMsg As String) As Boolean
 
Okay, looks like I forgot something :o, copy the below in the same Module...

Code:
 Public Function HasProperty(obj As Object, strPropName As String) As Boolean
    'Purpose:   Return true if the object has the property.
    Dim varDummy As Variant
    
    On Error Resume Next
    varDummy = obj.Properties(strPropName)
    HasProperty = (Err.Number = 0)
End Function
 
That function is already in my module, exactly as you show it.

Robert
 
Hmm, something is amiss because I can run it with errors. Can you post the error you get, oh, and a list of which References you have set.
 
Ginawhip: Can you remind me how to access references? It's been a while since I did that.
I tried this: In a code module of a form, I selected Tools, then References. I got the error message 'Error accessing the system registry'.

Robert
 

Users who are viewing this thread

Back
Top Bottom