Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
DblClick SubForm
Elisabeth Koivumaa 
    
5 years ago
I have a form where I click to open another form in a new window. In this form I have a subform and when I double click in it to open an order I want it to open in a new window, but that form ends up in the background (behind the second form)
How do I double-click the page I want to open in a new window?

Hope you understand what I mean?
Richard Rost  @Reply  
          
5 years ago
Sounds like you have your open event in the OnClick instead of the OnDblClick
Elisabeth Koivumaa OP  @Reply  
    
5 years ago
Private Sub SearchResults_DblClick(Cancel As Integer)

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Inventory_Ta_Emot_Order"

stLinkCriteria = "[OrderNr]= " & Me![SearchResults]
DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub
Richard Rost  @Reply  
          
5 years ago
So it's opening the right form, but then putting it immediately in the background? That's odd. See if it works in the OnClick event instead.
Elisabeth Koivumaa OP  @Reply  
    
5 years ago
No it did not help.
Richard Rost  @Reply  
          
5 years ago
Do you have any other code on the first form that might be forcing it back to the foreground? Without seeing your whole database, it's very hard to troubleshoot. Does this happen in a blank new database, or my Blank Template? It shouldn't. Something is amiss.
Elisabeth Koivumaa OP  @Reply  
    
5 years ago
I solved the error. Have struggled for so long and now I fixed it.
I added    ,, acDialog    after stLinkCriteria.

Have tried before but did not get it then.

*Happy*
Richard Rost  @Reply  
          
5 years ago
As long as you got it working, I'm happy too. :)

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/6/2026 6:39:06 PM. PLT: 1s