Results 1 to 3 of 3

Thread: want to show form dynamically

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2001
    Posts
    9

    want to show form dynamically

    Hi

    I am saving form names in database.
    I like to show the form dynamically by picking up the values from the db.

    for ex:

    "form1" is retrieved from db.Now i like to run the form form1.

    How can I show?


    Thanks
    Vijay

  2. #2
    Hyperactive Member abhid's Avatar
    Join Date
    Nov 2001
    Location
    3rd rock from the sun
    Posts
    467
    use forms collection
    like
    dim f as form
    for each f in forms
    ' add f.name
    next
    but it gives loaded forms only

  3. #3
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    I don't think it's possible directly.

    You can use a conditional construct to check the value picked up from the database and then show the relevant form, for e.g.

    VB Code:
    1. If FormName = "Form1" Then
    2.    Form1.Show
    3. ElseIf FormName = "frmMain" Then
    4.    frmMain.Show
    5. End If

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width