var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: How can i fill a text box with the relative data from a combo.
The query for the combo returns:
the combo got the err_name data.
how can I fill the text box with the err_id, e.g when I hit “qaz” the “01” to fill the text box
it is all in the which column is the bound column in properties/data of the combobox
also you can identify any value in the row of the combobox by calling out the index number of the column
will display the value of the SECOND column
the index starts with (0) not 1
nothing happens the text box remain empty or contains the combo’s data but never the first column of the combos query, can you give me an example with code ?
my code for this sub is :
Private Sub combobox_AfterUpdate()
[Textbox].value = [combobox].Column(0)
pls help !
try this first
what is the valu returned?
is the name of the combox? Is it combobox
If I try this
I got a message box with the name of the combo , not the id
If I try this
I got an error message 94
No authorized use of null?????
And of course nothing in the text box.
here is why
if you have no value for a column or it does not exist the null error will bubble up
is the data in the combobox in a table
if not create a table with 3 fields
add two records to the 3 column table
create a combobox from the table and then try the msgbox code
what are the results?
The same again….so let’s resume Igot a dta base called “mydb” witch contains 2 tables, “table1” & “table2” and a form
Table1 -> id, err
The data of the id are: 1,2,3
The data of the err are:aaa,bbb,ccc
The form is based on table2 and contain a combo and a text box. The combo get data from the query:
Select distinctrow err,id from table1;
So now how can I select the “bbb” value from the combo and the “2” value will appears in the text box???
I hope that this schematic can help you!!
It would help if you would check your combobox properties and tell us the following values:
Row Source Type:
Row Source: (cut and paste sql code please!)
Limit To List:
...and any events associated with it along with their complete code.
axsprog's solution should have worked. What you are trying to do is pretty simple, so something simple must be missing here.
You are right it was so simple, I turned the column count value to 2 and now works !!
Thank you guys!!!