displaying relationships

williamlove

Registered User.
Local time
Yesterday, 19:42
Joined
Feb 9, 2006
Messages
37
I tried creating a means for a user to look at the database relationships using

Private Sub cmdShowRelationships_Click()
DoCmd.RunCommand acCmdShowAllRelationships
End Sub

I get runtime error 2046: "The command or action ShowAllRelationships isn't available now."

I'd appreciate tips on how to make it possible to open relationships from a command button.
 
i know it's not what you're asking but did you know you can create a report of the relationships? (right-clk -> print relationships or maybe from the file menu; something like that).
 
Yes Adam someone at that site gave me the solution

Private Sub cmdShowRelationships_Click()
DoCmd.RunCommand acCmdRelationships
DoCmd.RunCommand acCmdShowAllRelationships
End Sub

But I must confess I still don't understand why it works with the second command, I don't see why my original line is not enough.
 

Users who are viewing this thread

Back
Top Bottom