Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing
Message
De
22/04/1999 09:56:08
 
 
À
21/04/1999 18:26:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00210242
Message ID:
00210976
Vues:
28
HI Ed:

Thanks for you last message. I would like to take the time to lay out exactly how I should be doing this, just to make sure I am all squared away. I wasn't able to do any work last night, so I didn't implement the information in your last message and try to run the form.

* The following is how I would set up my OFFICE SEARCH FORM. I am only going to assume I have 2 combo boxes [country & state], not 5. I know if I can get one to work, the others are a snap. I want to make sure this is correct:

1. Set up a property on my Office Search Form, called: CurrentCountry

2. Created a view called "countries" which I will tie to my country combo box.

3. Created a p_view called "state_search_pview", which has as its WHERE statement:

WHERE state_subordinate.njurisid_a = ?THISFORM.CurrentCountry

4. I then went back to my form designer and in the country combo box, set the following properties:

.rowsource = countries.cjurisname, njurisid, cjurisname
.rowtype = 6 (fields)
.bound = 2
.bound to = .T.
.interactivechange =

THISFORM.CurrentCountry = This.Value
=REQUERY("state_search_pview")
THISFORM.cmbstate.refresh()

5. In the init of my search form, I requeried my "state_search_pview"

6. I set the nodataonload for the p-view cursor to .T.

7. In the state combo box, I set the following properties:

RowSource = state_search_pview.cjurisname_b, njurisid_b, cjurisname_b
RowSource type = 6 (fields)
Bound = 2
Bound to = .T.
ControlSource = "state_search_pview" && b/c this is the view I am pulling the data from, which is why I typed this here.

** I believe that is it, when I run the form and select the USA as a country, I should see only the states that are in the USA, w/o seeing any id numbers in the state combo box!.... i hope

If you see anything wrong with this, please let me know.

****

One last request:

You sent me a message yesterday, which I didn't fully comprehend to be honest. You said that you wouldn't do it this way, but would tackle it another way. Could you lay out the code, as it would look your way, based on the above information? If not, I understand, but I would like to see how you would write the code if you were to do it. I guess I am gravitating toward the first method, b/c I have spent a week on those 5 combo boxes and got it to work, referencing the text. I am just a little leary of going a different route, b/c I don't understand it.


Thanks a lot for all the help.

Jason
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform