Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2003
    Posts
    68

    Unanswered: Passing values from form to form

    I have a Couple forms set up somewhat like a wizard, where the forms
    are building a profile of selections made in each screen. I want to keep updating those values in a single table from form to form. What is the best method in doing this.
    thanks
    jm
    jm

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by jmayo
    I have a Couple forms set up somewhat like a wizard, where the forms
    are building a profile of selections made in each screen. I want to keep updating those values in a single table from form to form. What is the best method in doing this.
    thanks
    jm
    OpenArgs property of the OpenForm method of DoCmd ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    I don't understand what you described at all...

    However, here's the syntax for referring to values on a form:

    forms!yourFormName!yourControlName

    So, if you want to imput the value in a textbox called "YourText" on "YourForm", to "MyTex" on "MyForm", you could do:

    me.MyText.value = forms!YourForm!YourText.value



    Edit: Or were you really asking about how to filter a form? Owen has you covered if that's the case.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    Aug 2003
    Posts
    68
    Sorry for the poor explanation

    I have Five forms of which each form answers questions relating to how to extract certain data from a Content File... As each question is answered I want it to build a profile in a Table so that they can recall that profile and rerun the extract.. So, my question is what is the best method of doing this..
    thx
    jm

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Ok, I'm still a little hazy on the details...

    Basically you have some questions.. checkboxes? combo boxes? option groups? or what-have-you... based on those selections you would like to build some sort of criteria and store it...

    I still can't be more specific because I don't know the exact process you're envisioning...

    I would say, in general, have a main form bound to the table you wish to store the criteria (profile) in. Then use some event driven code to populate the fields on this main form.. say if it's a combobox, you could write some code in the AFterUpdate event that would take the current value of the combo box and squirt it into your main form.

    That syntax would again be similar:

    forms!yourTargetForm!targetField = me.combobox.value
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  6. #6
    Join Date
    Aug 2003
    Posts
    68
    The first form will either ADDNEW record to profile table or go to another form to recall a previous extraction. The next question is, do they want a full extraction or do they want to select a field and build criteria to select from.
    That answer is stored in the profile table also. The next question if not full extract is, select the Field for example State and select the states that you would like the extract to be created from. That selection then is stored in the profile table also.. Then select another field etc... Then the last form is the
    extraction file type. Example .XLS,MDB, TXT etc.... Then they click to extract. That is basically it. I'm not real familiar with how to structure something like this, so any help would be great.
    thx
    jm

  7. #7
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Ok, that's basically along the lines of my last post then.

    You know, it wouldn't be to messy to put this all on one form.. couple different sections you know..

    The execution isn't to much different, but it would save you some object and code creation.

    Anywho, you have this main form that allows users to create a new "extraction", which I'm assuming is a set of criteria for some sort of data transfer. They can either create a new one, or select from a bunch they already have. This could be a combo box on your main form containing names that your users have given the extractions when they created them.. I do something like that with report preferences, works well.

    Ok, so now you have a record bound to your main form (we'll call it frmMain from here on out) ready to be edited. There are a couple ways you could go, you could create some option/check boxes/etc on the same form and let the user zip through them, or go the "wizard style" route you described. Doesn't matter much, just depends on how masochistic you are

    So, when the user selects a value from your options, each object will have an "afterupdate" event. In the code for that event, you can push the users choice back into the relevant field on frmMain using the "forms!formname!control/fieldname" syntax.

    When all of the criteria has been met, you could have a save button or what-have-you on frmMain.

    Does that pretty much make sense?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  8. #8
    Join Date
    Aug 2003
    Posts
    68
    Yes makes sense to do it the way you are discussing..
    Thanks
    jm

Posting Permissions

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