Solved

Setting popup property of a form using code

Posted on 2008-10-23
6
229 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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 500 total points
ID: 22789712
typo

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

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

752 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