Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Setting popup property of a form using code

Posted on 2008-10-23
6
Medium Priority
?
241 Views
Last Modified: 2008-11-17
How can I turn the pop up property of a form on and off using vba?  I am using Access 2000 which does not allow you to set a pop up property for reports (didn't start until acc 2002, i think).  So I have a pop-up form that I need to print preview a report from .  I was thinking I could just set the popup property to false when I click the command button to preview the report and then maybe set it back to true in the on close event of the report?   Will that work?  I can't get it to work.

In the on click event of the command button that previews the report, I tried bot:
me.popup  = false
me.form.popup = false

and both give me the same error: "You can't assign a value to this object"
0
Comment
Question by:snyperj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 75
ID: 22789304
Those are Read Only in run time mode. They can only be set in design view.

mx
0
 
LVL 75
ID: 22789347
From another Form, you *could* ... switch a form to design view, make the change, then switch it back to normal view.

mx
0
 

Author Comment

by:snyperj
ID: 22789366
Can I do that in the open event of the report?  how do you switch it to design view in code?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22789610
for whatever purpose you want to use this

private sub report_open(cancel as integer)
docmd.openform "x" ,acdesign,,,,achidden
forms!x.popup=false
dcmd.close acform,"x",acsaveyes

end sub

to turn it back on in the close event of th report

private sub report_close()
docmd.openform "x" ,acdesign,,,,achidden
forms!x.popup=true
dcmd.close acform,"x",acsaveyes
end sub




0
 
LVL 75
ID: 22789663
"how do you switch it to design view in code?"

I think CAP just showed you how.

mx
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 22789712
typo

dcmd.close acform,"x",acsaveyes
s/b
docmd.close acform,"x",acsaveyes
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question