954,559 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Help Needed in editing Combo Box in VB 6.0

Dear All,

Please Help me out in this matter.

I'm developing a small project, in this i'm uploading my combo box with master data ( i.e. List of Equipment).

What i'm doing is once the user complete entering data in form the data is saved. Now when i reload same form the data is upload in blank fields. Now if user want to update record in combo field, what is happening is the data is not reflected in combo ( Actually data is there in combo). i want same record which is save by user previously is shown in combo box.

Please help me..

"dam"
Newbie Poster
5 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

I'm still a little confused here on what you need... could you give me a little more info..

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

Actully i fill up combo at runtime from database.
User select any item from combo (i.e. in my case equipment) and subsequently other record fill up based on the equipment selected by user.

Please see the attached word file.

there are around 244 records. if user wants to update record no 2, when i click update button all the combo gone blank.

I want the the same record in combo (from database) when user click update button.

Thanks and Regards

Attachments New_Microsoft_Word_Document.doc (57.5KB)
"dam"
Newbie Poster
5 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

What's the code look like?

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

Please see the attachment.

I send you whole code.


Regards

Attachments Code.txt (26.17KB)
"dam"
Newbie Poster
5 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

it seems to me like the combo boxes in the update button are commented out:

'Combo1.Text = rs.Fields(0)
'cmbEqu.Text = mobjADORst1.Fields(cmbEqu.ListIndex)
'cmbLoc.List (cmbEqu.ListIndex)

Since comments don't actually do anything as far as the program goes, then naturally they wouldn't get populated..... try removing the ' from the beginning of those three lines in the cmdUpdate_Click()

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

Ya.. actually i wrote this code when doing some R&D.
Nothing is happen if i remove this code.

Re.

"dam"
Newbie Poster
5 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

Don't remove the code.... remove the ' before the code...
Do you have a sample database that you are working with this...
if you can attach the database (or a sample) with the .zip'd vb project,
I can try to see more clearly what you need.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

I mean if i remove comments, nothing is happening.

"dam"
Newbie Poster
5 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You