Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2003
    Posts
    15

    Unhappy Unanswered: load/show a form

    form1.show works fine.

    How to do the same with a recordset, like:

    form_name is a database field

    dataenvironment.recordset.fields("form_name").show?

    thanks in advance for your help

  2. #2
    Join Date
    Feb 2004
    Posts
    59

    Smile newbie's response

    hi jomafemar,

    what is the end-result that you are trying to accomplish? I'm a newbie, so I may not have a correct answer for you, but maybe i can help clarify for the 'big guns' :-).

    Well, the easiest way that I can see, would be to have the information in the recordset dumped to something 'physical' on the form, something like a text box, combo box, ListView, etc...

    Which type of 'physical' component you use would be up to you, and change the syntax, but the basic idea that you need to accomplish would be this.

    +go to the beginning of the recordset
    +loop through the recordset, dumping each record entry into the 'phsyical box'
    +continue the loop until all data is dumped
    +end

    If you can clarify what information you need, and how you need it presented, i'm sure we can whip up some sample code for you too! :-D

    best of luck! (i'm heading from work to home, so won't be able to respond for about another hour, but i'll check when i get home and repost if i can help :-) )
    -Matt H-
    www.comperfection.com

  3. #3
    Join Date
    Jul 2004
    Posts
    69
    instead of using the show property, use the value property..it goes like this:

    dataenvironment.recordset.fields("form_name").Valu e

    in this way, you're fetching the values of the field name form_name.

  4. #4
    Join Date
    Sep 2004
    Location
    Hong Kong
    Posts
    2
    I think i am finding the same thing as jomafemar,

    let me state what i hope to do in vb

    i hope to store the whole menu system into database, but the problem i found is even if i can load the form name from the database (as a string) , i found no way to do a form.load.... know what i mean? i hope to make the vb can load whichever form i found , i.e. from the string

    e.g.
    i have a form called frmLogin
    i can call it directly by
    frmlogin.show

    but how can i called the form.show if all i got is
    dbrs("formname").value ' the value inside is a string "frmLogin"

  5. #5
    Join Date
    Jan 2005
    Posts
    18

    Red face load/show

    this can be accomplished using the following statement too

    dataenvironment.recordset!form_name

  6. #6
    Join Date
    Jan 2005
    Posts
    18

    Red face load/show

    this can be accomplished using the following statement too

    dataenvironment.recordset!form_name

  7. #7
    Join Date
    Jan 2005
    Posts
    18
    Hi Friend

    Why dont u try this

    Dim frmAny As Form
    For Each frmAny In Forms
    if frmAny.Name = "frmLogin" then
    frmAny.show
    end if
    Next


    give me a feedback as soon as u try this

  8. #8
    Join Date
    Sep 2004
    Location
    Hong Kong
    Posts
    2
    thx neezha_s ,

    i've try what you post,

    but my question is if i use this method, do i need to load all the form in the project and hide them?

    i using debug mode and found the there is only one form called formMain in the forms (formmain is the MDI parent)

    is there any clue to load a form???

    thx you

Posting Permissions

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