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 doesn't show saved value

Status
Not open for further replies.

JSD1976

Programmer
Aug 17, 2004
16
0
0
US
Hello

I am working with a VB6 form linked to MS Access db via Adodc connection. I have a combo box on the form. When I pick a value from the combo box, it writes the value to my Access db. However, if I exit the VB6 project, then load it up again and try to view the same record, the value I picked from the combo box is not there. But I checked in the table and it was written to the table. So I added a text box to the form, linked it to the same field the combo box was writing to, and there is my value. My question is, is there any way to show my values in the combo box. The combo code is:

Private Sub Form_Load()
Text3.AddItem "D-0"
Text3.AddItem "D-1"
Text3.AddItem "D-2"
Text3.AddItem "1/4 Keg"
End Sub

Any ideas are extremely appreciated.

Thanks

Jeremy
 
Jeremy,

You either need a crystal ball or you have to store the last value in a retrievable location.

Skip,
[sub]
[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue][/sub]
 
I like to use the registry with the VB Getsetting and SaveSetting functions to allow my programs to 'remember' values from the last time a program was run.

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top