Gossamer Forum
Home : General : Databases and SQL :

Simple combo box/text box issue, difficult description

Quote Reply
Simple combo box/text box issue, difficult description
I've got a simple combo box/text box issue, which is difficult to describe. Best of all would be to see the database itself. The (93 KB) is attached. It was almost working, but I broke it.

I'm making a database for reference of English, Spanish, Portuguese, and Haitian Kreyol verbs. The database has 6 tables, all of which are related. If you understand English and a little of either Spanish or Portuguese, then what I want the database to do is easy to understand, but if you don't it's still easy.

Please allow me to describe...

Of the 6 tables comprising the database, perhaps the main one is table "tblInfinitives," which has 6 fields as follows...

fldInfId
fldConId
fldInfEng
fldInfEsp
fldInfPor
fldInfKreId

First a little lesson on languages... The most basic form of a verb is its infinitive form, for example, to talk, to eat, to lie. As an example of a record of table "tblInfinitives," let's use the english infinitive "to talk." We would have "to talk" in the field "fldInfEng." In the field "fldInfEsp" we would have "hablar," which is Spanish for "to talk." In the field "fldInfPor" we wold have "falar," which is Portuguese for "to talk." As for Haitian Kreyol verbs, they do not conjugate, or change form depending upon usage, as do Spanish and Portugues verbs. More on Haitian Kreyol verbs and field "fldInfKreId" later.

So, the purpose of table "tblInfinitives" is to store the basic infinitive verbs forms of English, Spanish, and Portuguese. Regarding Haitian Kreyol infinitive verb forms, they are stored in another table, because they are simpler, so the only value for Haitian Kreyol verbs in table "tblInfinitives" is a number. Again, more on Haitian Kreyol verbs and field "fldInfKreId" later.

Here is a brief description of each field of table "tblInfinitives"...

Field "fldInfId" is the autonumber id field. Simple.

Field "fldConId" is a numbered field accounting for the conjugations of the English, Spanish, and Portuguese verbs. It has a MANY-TO-ONE relationship with the field of the same name in table "tblConjugations." I address conjugations and "fldConId" when I tell you about table "tblConjugations."

Field "fldInfEng" is a text field for storing the infinitive verb forms of english verbs, for example, to talk, to eat, to lie.

Field "fldInfEsp" is a text field for storing the infinitive verb forms of Spanish verbs, for example, hablar, comer, mentir, which mean to talk, to eat, to lie, respectively.

Field "fldInfPor" is a text field for storing the infinitive verb forms of Portuguese verbs, for example, falar, comer, mentir, which mean to talk, to eat, to lie, respectively. Spanish and Portuguese are very similar in some ways. Notice, for example, that the 3 verbs I cite here are the same for Spanish and Portuguese, with the one exception of "to talk." In Spanish, "to talk" is "hablar." In Portuguese, "to talk" is "falar."

Field "fldInfKreId" is a number field for storing the infinitive id number of Haitian Kreyol infintive verb forms. Field "fldInfKreId" has a MANY-TO-ONE relationship with the field of the same name in table "tblKreInf." As I mentioned before, Haitian Kreyol verbs do not conjugate, or change form depending on usage, as do Spanish and Portuguese verbs. Because Spanish and Portuguese verbs do change, more tables are needed to account for their many other forms. Not so with Haitian Kreyol verbs. Only one table suffices. That table is "tblKreInf," which, conveniently, is the next table I'll describe.

-----------------------------------------------

Table "tblKreInf" has 3 fields as follows...

tblKreInf
fldInfKreId
fldKreInf
fldKreExpId

Field "fldInfKreId" is an autonumbered field with a ONE-TO-MANY relationship with the field of the same name in table "tblInfinitives."

Field "fldKreInf" is a text field for storing Haitain Kreyol infinitive verb forms, for example, pale, manje, menti, which mean to talk, to eat, to lie, respectively.

Field "fldKreExpId" is a number field with a ONE-TO-ONE relationship with the field of the same name in table "tblKreExp." The "Exp" part of this field stands for "expressions."

-----------------------------------------------

The purpose of table "tblKreExp" is for storing expressions. Table "tblKreExp" has 3 fields as follows...

tblKreExp
fldKreExpId
fldKreExp
fldKreDef

Field "fldKreExpId" is an autonumbered field.

Field "fldKreExp" is a text field for storing Haitian Kreyol expressions as written in Haitian Kreyol.

Field "fldKreDef" is a text field for storing Haitian Kreyol expression english definitions.

------------------------------------

Next, we come to table "tblConjugations," which begs for another short lesson on the Spanish and Portuguese languages. The infinitive verb forms in Spanish and Portuguese may be grouped by their endings. For example, notice the "-ar" ending of "hablar" and "falar" which mean to "to talk" in Spanish and Portuguese respectively.

The Spanish and Portuguese infinitives are the same for "to eat," which is "comer." Notice the "-er" ending of "comer." The Spanish and Portuguese infinitives are the same for "to lie" as well, which is "mentir." Again, notice the ending of "-ir."

It's important to know which conjugation an infinitive verb form belongs to, whether it's "-ar," "-er," or "-ir," because each conjugation takes on a different form depending on who the speaker is (I, we), who the hearer is (you, you all, them), tense (now, the past, the future), etc.

The important thing to grasp about Spanish and Portuguese infinitive verb form conjugations (endings) is that 3 basic forms exist, specifically "-ar," "-er," and "-ir." For starters the whole table "tblConjugations" will have only 3 records to accomodate the three basic conjugations of "-ar," "-er," and "-ir."

The purpose of table "tblConjugations" has 5 fields as follows...

tblConjugations
fldConId
fldConEsp
fldEspTenseId
fldConPor
fldPorTenseId

Field "fldConId" is an autonumbered field with a ONE-TO-MANY relationship with the field of the same name in table "tblInfinitives."

Field "fldConEsp" is a text field for storing the infinitive verb forms of Spanish verbs. Although I might have thousands of records of verb infinitives in table "tblInfinitives," they all may be categorized according to conjugation (ending), specifically "-ar," "-er," and "-ir."

Field "fldEspTenseId" is a number field with a ONE-TO-ONE relationship with the field of the same name in table "tblEspTenses."

Field "fldConPor" is a text field for storing the infinitive verb forms of Portuguese verbs. Like Spanish, I might have thousands of records of verb infinitives in table "tblInfinitives," yet they all may be categorized according to conjugation (ending), specifically "-ar," "-er," and "-ir."

Field "fldPorTenseId" is a number field with a ONE-TO-ONE relationship with the field of the same name in table "tblPorTenses."

------------------------------------

The purpose of table "tblEspTenses" is for storing the many different forms that an infinitive takes on, according to usage. Table "tblEspTenses" has 4 fields to start with. The remaining fields may be added easily once the first 4 work properly. As is the case with table "tblConjugations," only 3 records will populate table "tblEspTenses" to start with.

Here are the fields of table "tblEspTenses"...

tblEspTenses
fldEspTenseId
fldEspPresentParticiple
fldEspPastParticiple
fldEspImperative

Field "fldEspTenseId" is an autonumbered field with a ONE-TO-ONE relationship with the field of the same name in table "tblConjugations."

Field "fldEspPresentParticiple" is a text field for storing the present participle form of Spanish verbs. For example, the present participle form of the infintive "hablar" (to talk) is "hablando," which means "talking."

Field "fldEspPastParticiple" is a text field for storing the past participle form of Spanish verbs. For example, the past participle form of the infintive "hablar" (to talk) is "hablado," which means "spoken."

Field "fldEspImperative" is a text field for storing the imperative (order) form of Spanish verbs. For example, the imperative form of the infintive "hablar" (to talk) is "hable," which is interpreted "you must speak."

------------------------------------

The last table "tblPorTenses" is identical to table "tblEspTenses," except table "tblPorTenses" accounts for Portuguese infintive verb forms, according to usage.

Here are the fields of table "tblPorTenses"...

tblPorTenses
fldPorTenseId
fldPorPresentParticiple
fldPorPastParticiple
fldPorImperative

Field "fldPorTenseId" is an autonumbered field with a ONE-TO-ONE relationship with the field of the same name in table "tblConjugations."

Field "fldPorPresentParticiple" is a text field for storing the present participle form of Portuguese verbs. For example, the present participle form of the infintive "falar" (to talk) is "falando," which means "talking."

Field "fldPorPastParticiple" is a text field for storing the past participle form of Portuguese verbs. For example, the past participle form of the infintive "falar" (to talk) is "falado," which means "spoken."

Field "fldPorImperative" is a text field for storing the imperative (order) form of Portuguese verbs. For example, the imperative form of the infintive "falar" (to talk) is "fale," which is interpreted "you must speak."

------------------------------------

The relationships report I created with the little prototype database (93 KB) makes the whole thing clearer.

Now the solitary form, form "frmVerbs." It has 2 combo boxes and a bunch of text boxes as follows...

First, the combo boxes...

cboEspInf...........(combo box for Spanish infinitives)
cboPorInf...........(combo box for Portuguese infinitives)

Next, the text boxes for the basic infinitive verb forms...

txtEngInf...........(text box for English infinitives)
txtEspInf...........(text box for Spanish infinitives)
txtPorInf...........(text box for Portuguese infinitives)
txtKreInf...........(text box for Kreyol infinitives)

Then the text boxes relevant to Spanish tenses...

txtEspPresentParticiple...........(text box for Spanish present participle verb forms)
txtEspPastParticiple...........(text box for Spanish past participle verb forms)
txtEspImperative...........(text box for Spanish Imperative verb forms)

The text boxes relevant to Portuguese tenses...

txtPorPresentParticiple...........(text box for Portuguese present participle verb forms)
txtPorPastParticiple...........(text box for Portuguesepast participle verb forms)
txtPorImperative...........(text box for Portuguese Imperative verb forms)

Finally the text boxes for Haitian Kreyol expressions...

txtKreExp...........(text box for Kreyol expressions)
txtKreDef...........(text box for the English interpretations of Kreyol expressions)

------------------------------------

Last, the desired functionality. Let's say you want to enter a new "-ar" verb form.

1. Enter "to walk" in text box "txtEngInf"
2. Enter "andar" in text box "txtEspInf"
3. Enter "andar" in text box "txtPorInf"
4. Enter "mache" in text box "txtKreInf"

At the point the remaining text boxes would be blank.

5. Click either combo box "cboEspCon" or combo box "cboPorCon" to select "hablar," which is the model "-ar" infinitive verb form.

Now the values of the remaining text boxes are set, according to step #5.

END