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 
More than one copy of a form
Steven Verhaegen 
     
2 years ago
I have made a form where i can see for example an PDF. But i want to open more than 1 copy of it, to show another PDF. How can I do this?
Adam Schwanz  @Reply  
           
2 years ago
You can't open the same form multiple times, you'd have to make additional forms, or change your setup so you could display multiple records on one form with subforms.
Steven Verhaegen OP  @Reply  
     
2 years ago

Steven Verhaegen OP  @Reply  
     
2 years ago
It's not to show records, but for example PDF
Steven Verhaegen OP  @Reply  
     
2 years ago
All the code from the form itself
Details'----------------------------------------------------------------------------------------------
Option Compare Database
Option Explicit

Dim varSplitStringd() As String

Private Sub BtnBestandOpenen_Click()
    Call NogNiets
End Sub

Private Sub BtnSluiten_Click()
    TempVars("BestandID") = ""
    DoCmd.Close acForm, Me.Name
End Sub

Private Sub Form_Load()
    Call tonen
    
    '----- FORMULIER CENTREREN -----
    FormulierCentreren "Preview"
End Sub

Private Sub tonen()
    If Not IsNull(Forms!Preview.OpenArgs) Then
        varSplitStringd = Split(Me.OpenArgs, "|")
        Me.TxtLinkbestand.Value = varSplitStringd(0)
    End If
End Sub
Steven Verhaegen OP  @Reply  
     
2 years ago
The code to open the preview form.

DetailsPrivate Sub BtnCommercieel_Click()
    AllOff
    Me.BtnCommercieel.BackColor = RGB(204, 204, 204)
    OpenPreview 498, Forms!Dossier_Project.WerfID
End Sub



CODE TO FIND THE CORRECT DOCUMENT TO SHOW

DetailsPublic Sub OpenPreview(Wat As Integer, Project As Integer)
'----- NOG AANPASSEN VOOR ANDER SOORTEN BESTANDEN -----
'----- KAN DIT NOG NIET UNIVERSEEL GEBRUIKEN WERKT VOORLOPIG ENKEL VOOR LASTENBOEKEN   -----
'----- BV voor bestelbonnen zullen er meer zijn voor 1 project en dat voldoet <>  -----
'----- en <> niet alleen                                                      -----
    Dim Boodschap As String
    If DCount("BestandID", "Q_BestandenMetLink_Alfa", "BestandWat =" & Wat & " AND ProjectID =" & Project) = 0 Then
        Select Case Wat
            Case 418
                Boodschap = "Lastenboek architectuur niet gevonden voor dit project."
            Case 419
                Boodschap = "Lastenboek stabiliteit niet gevonden voor dit project."
            Case 420
                Boodschap = "Lastenboek elektriciteit niet gevonden voor dit project."
            Case 421
                Boodschap = "Lastenboek sanitair niet gevonden voor dit project."
            Case 498
                Boodschap = "Commercieel lastenboek niet gevonden voor dit project."
            Case 499
                Boodschap = "Lastenboek HVAC niet gevonden voor dit project."
        End Select
        antwoord = MyMsgBox(Boodschap, "INFO", "OK", "", "", 1, 1, 2500)
        GoTo Sub_Verlaten
    End If
    IDLastenboek = DLookup("BestandID", "Q_BestandenMetLink_Alfa", "BestandWat =" & Wat & " AND ProjectID =" & Project)
    TempVars("BestandID") = IDLastenboek
    BestandPath = DLookup("Bestand", "Q_BestandenMetLink_Alfa", "BestandID =" & IDLastenboek) & "|"
    'DoCmd.OpenForm "Preview", , , , acFormReadOnly, acWindowNormal, BestandPath
    DoCmd.OpenForm "Preview", , , "BestandID =" & IDLastenboek, acFormReadOnly, acWindowNormal, BestandPath
Sub_Verlaten:
    Exit Sub
End Sub
Alex Hedley  @Reply  
           
2 years ago
Richard did you ever do this?
Multiple Instances of the same Form.
(Spawn Copies is at the db level)
Richard Rost  @Reply  
           
2 years ago
Yeah, I've done this before with class modules. It's been on the list for a TechHelp video for a while, but I didn't think there was much demand for it.

Of course, I need to cover class modules first. :)
Jennifer Neighbors  @Reply  
     
2 years ago
Richard, I would LOVE for you to cover class modules!!
Richard Rost  @Reply  
           
2 years ago
It's been on my list for a Developer level video. Coming very soon. Just need to get thru these lessons on customizing the Ribbon. LOL

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: 6/27/2026 12:04:41 AM. PLT: 1s