combobox command checkbox

patatrac

Registered User.
Local time
Today, 12:27
Joined
Jan 17, 2010
Messages
46
Hy
I have two table
id-italian and id-english
1 ciao 1 hello
2 grazie 2 thanks
is possible make a selector or checkbox italian english for choose the lenguage and
if user select italian the combobox populate with word ciao , grazie
if user select english combobox populate with hello , thanks.
Or most good make a single table with italian english and if select italian go to coloumn 2 if select english go to coloumn 3
:)
thanks
 
Last edited:
Hy
I have two table
id-italian and id-english
1 ciao 1 hello
2 grazie 2 thanks
is possible make a selector or checkbox italian english for choose the lenguage and
if user select italian the combobox populate with word ciao , grazie
if user select english combobox populate with hello , thanks.
Or most good make a single table with italian english and if select italian go to coloumn 2 if select english go to coloumn 3
:)
thanks

If it's only two lines, why don't you just hard code it and just call the function?

If ComboboxName.value & "" = "English" then
' Do English
else
' Do Italian
end if
 
Code:
Private Sub Cornice4_Click()
Dim strSQL As String
Dim strSQL2 As String
strSQL = "SELECT [italiano] FROM [Tabella1]"
strSQL2 = "SELECT [inglese]FROM [Tabella1]"
If Me.Cornice4 = 1 Then
Me.Requery
Me.ComboBox.RowSource = strSQL
ElseIf Me.Cornice4 = 2 Then
Me.Requery
Me.ComboBox.RowSource = strSQL2
End If
End Sub
thanks
i made this code
is good this....
 
Code:
Private Sub Cornice4_Click()
Dim strSQL As String
Dim strSQL2 As String
strSQL = "SELECT [italiano] FROM [Tabella1]"
strSQL2 = "SELECT [inglese]FROM [Tabella1]"
If Me.Cornice4 = 1 Then
Me.Requery
Me.ComboBox.RowSource = strSQL
ElseIf Me.Cornice4 = 2 Then
Me.Requery
Me.ComboBox.RowSource = strSQL2
End If
End Sub
is good this....

I don't understand why you want to change the combo box's record source. What if I change it to English, and I decide I want to change it back to Italian? I wouldn't be able to do so.
 
I would change combo becouse my for have two lenguage...
italian and english and for me is necessary populate combo with italian or english.
Is good the code that i post...
I use this code but no requery fast the combo...
With your code i don't understand how possible make it ....:rolleyes:

sorry for my no good english lenguage
 
I will come to your code in a minute. Is the combo box bound or unbound?
 
the combo add new recordset in an another table and now is bound with query table lenguage

with this code i unbound combo
and bound the combo with checkbox
 
Do you really want to use tables? It can be done without tables if you wish?
 
i don't know
the most easy solution for me is good
thanks a lot
 
Zip your database and post it on here. I will show implement two ways so you can decide which you want.
 
before i think that For me is necessary save the id of italian vs english in the Tabella2 1 , 2, 3 an so on...... not the words
but now think that is no good idea because after no possible know if is italian or englis because the id is equal....
thanks for help me :)
the second i think work most good... necessary me.Combobox.requery
look if ok
 

Attachments

Last edited:
There you go. The idea is hiding the columns that are not needed. Italian is column 1, and English is 2. Look at your table, that's how you laid it out. I didn't have time to look at your new db so just have a look at what I've attached and tell me what you think.
 

Attachments

Thanks a lot
is very good solution:)

and if i would print a report bound the checkbox :
if user click italian LENGUAGE in report see coloumn1(italian) if user click english LENGUAGE in report see coloum2(english)
is possible......
 

Attachments

Last edited:
It is possible. You need to read about building reports.
 
this is what 's i would made
if user click english in report write english lenguage and no italian..
is possible....
thanks:)
 

Attachments

Google, "how to create ms access reports", read about creating reports
 

Users who are viewing this thread

Back
Top Bottom