Dynamic Subforms

Okay, here is a really interesting problem that I ran into.

My organization needs to create an Access Database for evaluations of sessions they hold. They have various amounts of speakers at these sessions, which is not a definate amount. I want to create an easy to use form that allows the person doing data entry the abilty to select the amount of speakers that lectured, then have the form automatically update (dynamically create) that amount of subforms.

Any ideas? I figured the solution would be some VB code. Is this even possible?

Anthony

Comments

  • Please forward the answers that you received

  • : Please forward the answers that you received
    :
    :

    I'm not even sure if this is possible. Does anyone have any suggestions?
  • : : Please forward the answers that you received
    : :
    : :
    :
    : I'm not even sure if this is possible. Does anyone have any suggestions?
    :

    [blue]
    If you can give me an example of the table structure you use I might be able to help you.

    My idea is to create blank records based on a number entered in a text box. Then use a continuous subform to display the records that need to be filled in. However, that is based on certian table structure. If you can tell the layout of your database I might be able to help you.
    [/blue]
  • : Okay, here is a really interesting problem that I ran into.
    :
    : My organization needs to create an Access Database for evaluations of sessions they hold. They have various amounts of speakers at these sessions, which is not a definate amount. I want to create an easy to use form that allows the person doing data entry the abilty to select the amount of speakers that lectured, then have the form automatically update (dynamically create) that amount of subforms.
    :
    : Any ideas? I figured the solution would be some VB code. Is this even possible?
    :
    : Anthony
    :


    well. I think you can't dynamically create forms, I know a way to create other objects dinamically, say, textboxes, labels and so on.

    I ask you this.. Do you need forms? Or maybe you can create as many tabs as you need (with a SSTab control) and inside the other objects?

    that can be done, if you are interested, just send me a mail.

    greetings..

  • : : Okay, here is a really interesting problem that I ran into.
    : :
    : : My organization needs to create an Access Database for evaluations of sessions they hold. They have various amounts of speakers at these sessions, which is not a definate amount. I want to create an easy to use form that allows the person doing data entry the abilty to select the amount of speakers that lectured, then have the form automatically update (dynamically create) that amount of subforms.
    : :
    : : Any ideas? I figured the solution would be some VB code. Is this even possible?
    : :
    : : Anthony
    : :
    :
    :
    : well. I think you can't dynamically create forms, I know a way to create other objects dinamically, say, textboxes, labels and so on.
    :
    : I ask you this.. Do you need forms? Or maybe you can create as many tabs as you need (with a SSTab control) and inside the other objects?
    :
    : that can be done, if you are interested, just send me a mail.
    :
    : greetings..
    :
    :

    update
    i think you can create a form dinamically, go to File, then New, then choose the VB Application Wizard, then select a MDI Document Interface.

    There you should find some code that creates a form every time a user go to the file menu, new document, as you can guess, there has a be a "Form Base" to create another.

    Hope helps..
  • [b][red]This message was edited by ranainnet at 2005-10-18 15:27:5[/red][/b][hr]
    : : : Okay, here is a really interesting problem that I ran into.
    : : :
    : : : My organization needs to create an Access Database for evaluations of sessions they hold. They have various amounts of speakers at these sessions, which is not a definate amount. I want to create an easy to use form that allows the person doing data entry the abilty to select the amount of speakers that lectured, then have the form automatically update (dynamically create) that amount of subforms.
    : : :
    : : : Any ideas? I figured the solution would be some VB code. Is this even possible?
    : : :
    : : : Anthony

    you can create a form dinamically. create a variable as new form then just call its show method. But these forms will be all alike the 1st form. for example just do the following--

    'let your first form is named form1. then do the following
    dim NewDinamicForm as new form1
    'then write the following code in the appropriate event
    NewDinamicForm.Show
    '========

    But there is some trick to make the form show different. You will have to use all the controls in all the forms. This will make the program a bit Heavy. Suppose in the first form you need to put the number of dinamic forms you need (this will require only a text box in the first form) and in the dinamic forms you need many other controls like grid control and others.

    To do this you will have to place all the controls (text box for inputting the number of dinamic forms you need later and the grid contorls + other contorls) in the 1st form. And to hide the unnecessary controls just set the visible property of the contorls to false.

    you can put the
    NewDinamicForms.Show
    command in a loop which will continue the time you placed in the 1st form.

    GoodLuck. (sorry for the spell mistakes)
    _____________________________________________________________________________
    Knowledge Is Power. Be Sure To Use This Power For Others WelFare. (;->



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories