Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

[2618] Multi Instance Forms

Last post 04-21-2005 6:56 PM by PellaCAD. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-01-1999 12:00 AM

    [2618] Multi Instance Forms

    This thread is for discussions of Multi Instance Forms.

    • Post Points: 0
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 07-13-2002 7:45 PM In reply to

    Lifechanging, earthshattering, groundbreaking, dozey-doeing, people-in-grass-houses-shouldn't-stow-thronesing, nutcracking, chicken-winging, monkey-nutting, enlightening, shiver-to-the-spining, other-bad-verbsing, lips-smattering, finger-licking, pop-pickering, arse-retching, vindicative delirious vivacious facetious incredulous ghoulish spooky weird screwed up rabbithutching work. Well done.

    One question though.......what the hell is it?

    Kev "Carly Warly" Carlucci (pronounced Car-LOOCH-ee)
    • Post Points: 0
  • 07-13-2002 7:56 PM In reply to

    • domdm
    • Top 500 Contributor
    • Joined on 07-01-2002
    • United Kingdom
    • Addicted Member
    • Points 385
    Well what it is is a peice of code for creating multi instances of a form at runtime, this means that you create the form once in design view (therefore code it once) but at runtime you can call the form many times and open up more than one version of it.

    A good example is an Instant messanger program such as MSN,  the message window is only designed once but you the user can open more than one instance of it and use it to chat to different people.


    Hope that helped answer your question,

    Dom
    ComputerGuides
    • Post Points: 0
  • 04-21-2005 3:18 PM In reply to

    • paulj
    • Not Ranked
    • Joined on 04-21-2005
    • New Member
    • Points 10

    work in vba?

    Trying to get this to work in vba in ms access 2003. Keep getting a "Member already exists in an object module from which this object module derives."

    Option Compare Database
    Option Explicit
    '//Define Variables for the form
    Dim NewPage() As New Form_frmTest
    Public Pages As Integer


    '//Define Variables for the Number of forms that have been opened
    Private Sub cmdTest_Click()

       'pagetest = 0
       Pages = Pages + 1
       
    ReDim Preserve NewPage(Pages)

    'set the new forms page number
      ' NewPage(Pages).lblNum.Caption = Pages
       
    'open a new page
     DoCmd.OpenForm NewPage(Pages).Name, acNormal

    'redimensionise the new page array
      ReDim NewPage(Pages + 1) As New Form_frmTest

    End Sub
    • Post Points: 0
  • 04-21-2005 6:52 PM In reply to

    • PellaCAD
    • Not Ranked
    • Joined on 04-21-2005
    • New Member
    • Points 10

    VBA - Appending Data - HOW???

    How can I make the follwoing code APPEND to an existing file??

    Private Sub CommandButton14_Click()
    'Sub TextStreamTest()
       Const ForReading = 1, ForWriting = 2, ForAppending = 3
       Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
       Dim fs, f, ts, s
       Set fs = CreateObject("Scripting.FileSystemObject")
       fs.CreateTextFile "test1.txt"            'Create a file
       Set f = fs.GetFile("test1.txt")
      Set ts = f.OpenAsTextStream(ForWriting, TristateUseDefault)
       ts.Write "Hello World"
       ts.Close
       Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
       s = ts.ReadLine
       MsgBox s
       ts.Close
    End Sub

    You would think simply replacing ForWriting with ForAppending would work...NOT!!!!!!!!!

    What else must one do to APPEND data to a file??

    Pete  pellacad@kdsi.net   (THANKS!)
    • Post Points: 0
  • 04-21-2005 6:56 PM In reply to

    • PellaCAD
    • Not Ranked
    • Joined on 04-21-2005
    • New Member
    • Points 10

    VBA Data - APPEND

    How can I make the follwoing code APPEND to an existing file??

    Private Sub CommandButton14_Click()
    'Sub TextStreamTest()
      Const ForReading = 1, ForWriting = 2, ForAppending = 3
      Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
      Dim fs, f, ts, s
      Set fs = CreateObject("Scripting.FileSystemObject")
      fs.CreateTextFile "test1.txt"            'Create a file
      Set f = fs.GetFile("test1.txt")
     Set ts = f.OpenAsTextStream(ForWriting, TristateUseDefault)
      ts.Write "Hello World"
      ts.Close
      Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
      s = ts.ReadLine
      MsgBox s
      ts.Close
    End Sub

    You would think simply replacing ForWriting with ForAppending would work...NOT!!!!!!!!!

    What else must one do to APPEND data to a file??

    Pete  pellacad@kdsi.net   (THANKS!)
    • Post Points: 0
Page 1 of 1 (6 items)