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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Too Much Information...

Status
Not open for further replies.

bluenoser337

Programmer
Jan 31, 2002
343
CA
I am calling an Access 2000 report from VB6. Before the report comes into view, Access opens...exposing (and making available) the entire DB set-up (table, queries, etc). Also, when closing Access after viewing the report, sometimes the VB application gets closed because the user "double-clicks". Question 1 - How do you display the report without everything else showing up. Question 2 - How can I disable the close button on all my child windows? I'm a newbie so take pity, please. Many thanks!!!!
 
1. Trie to compile the Access 2000 database as a .mde file with options to hide the database. But you realy need to call that report? Why don't you make a report in VB and interogate that Access database for data? In this case, the Access wouldn't open at all!... (Just a sugestion).
2. What do you understand by "all my child windows"? Do you have a mdi form in your VB project? Anyway, there is an API function for this (or maybe more then one): setwindowpos or something. Chek it out.

Hope I've been helpful,
Bogdan Muresan.
 
Another thing regarding your 2-nd question:
Trie this in all your child forms:

Private Sub ChildForm_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If varboolOKToClose = False then Cancel = True
End Sub

where varboolOKToClose is a global bool variable where you keep if the form can / can't close.

Is this a better approuch?

Hope I've been helpful,
Bogdan Muresan.
 
Tried compiling as an MDE but I can still modify the database after I call and display the report from the VB application. Note: This system has no VBA in Access...the VB code is separate. Also..."Why don't you make a report in VB...". The report and it's query are already created in Access 2000. I don't have the option (or knowhow) for changing that. Thanks!
 
1. In Access go to Tools->Startup to display startup options. There is an option for "Display Database Window"... uncheck this.
 
bmoyer23...if I do this, I get a VB error "The command or action 'OpenReport' isn't available now".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top