Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box does't update to Text Box

Status
Not open for further replies.

cparralesl

Programmer
Jan 27, 2002
118
0
0
NI
Hello guys,

I'm trying to build a screen that use a Combo Box which is using ADO data control connected to Access 2K DB.

The main purpose is to select an item from the Combo box and after the selection the others objects, text boxes,
get the position if the selection.

I'm a little rusty on this and I will appreciate the you can give me.

Thansk in advance


Cesar Humberto Parrales
Application Support
 
Have you any code at the moment, or are you after the pointers of where to start?

BB
 
I don't understand your question...

Do you want to make the location of your textboxes on you form dependent on the selection in this combobox, or do you want to add the data selected in the combobox to the textboxes.

For the first option, you need something like this:
textbox.move (combobox.text->reference to left, combobox.text->reference to top, combobox.text->reference to width, combobox.text->reference to height)

The second option would require something like:
textbox.text = combobox.text

hope this helps in any way...
 
Ok, Fist of all, thaks guys for you answers,

I have los t a little of experience with VB so,

BiggerBrother:[/Color Blue]

I'm trying to make this using the controls with no code, so at this moment I'm have no code for this.



Overdoos:[/Color Blue]


What I need to have as final scenario is that the user can select a module from a combo box and after the selection he can view and change the periods of its. For example, he can select the AR modulo from the combo box and then show the begining dates and closing date of it months.
The database is Access 2K and the information that I need to retrieve is stored in a single table. This table linked to another table which store the code, description and status of the modules installed.

Thanks again and i hope you can help me to solve this.








Cesar Humberto Parrales
Application Support
 
I guess what I would do is:
at startup:
* launch an SQL query to select the module names and populate the drop-down with these names

on DropDown selection:
* create a query selecting the details of the selected module
* use the results of this query to populate the textboxes.

(is this more or less what you had in mind?)

So, after putting the DB-results in a recordset, loop through them UNTIL recordset!EOF meanwhile populating the dropdown (combobox1.additem recordset!modulename)

After the selection, launch the new SQL-query to get the details of the module...
textbox1.text = resultset!<field1>
textbox1.text = resultset!<field2>
textbox1.text = resultset!<field3>
 
That's exactly what I need!

I though it was easier to do it binding the objects without code.

Thak you guys for your response. It was helpful.



Cesar Humberto Parrales
Application Support
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top