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

Report hidden when database window is hidden

Status
Not open for further replies.

ProdEng

Programmer
Dec 22, 2011
2
GB
Hi,

This is my first post on this forum as I can usually find what I am looking for in other threads but I am stuck with this issue.

My database window is hidden using the code:

Private Sub Form_Load()
Dim lWin As Long
lWin = apiShowWindow(Application.hWndAccessApp, 0)
End Sub

This is on my main form which opens automatically when the database is opened.

I then can generate a report using a different form but the report is not visible and as it is set to pop up and modal it does not let me do anything else on my database and i must then restart the program.

When the database window is unhidden the report is visible and the database functions perfectly however i need this to work with the window hidden.

Any help is greatly appreciated.

Thanks
 
on you button to open the report are you using:
DoCmd.OpenReport Me![strSelectReport], acViewPreview
Where strSelectreport is the name of you report.

Never give up never give in.

There are no short cuts to anything worth doing :)
 
I am currently using the code:

DoCmd.OpenReport "Fault Records", acViewReport

Do you see something that could be causing the error here?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top