2 Replies - 1382 Views - Last Post: 17 October 2012 - 02:09 PM Rate Topic: -----

#1 LogicTricks  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 08-October 11

Update a combobox without closing it ... Database

Posted 13 October 2012 - 01:11 AM

Hello guys , how can i update a combo box without closing it ?.. Ex: if i enter a number in textbox it will go to the database then automatically add to the combobox ..

How can i refresh it ?

If Index = 0 Then

query = "Insert into CAT(Category,Description)Values('" & Text2.Text & "','" & Text3.Text & "');"
rs6.Open query, cn, adOpenDynamic, adLockPessimistic
MsgBox "Category Saved!!!"
rs6.Requery             << ----------- I try this but it wont work
Text2.Text = ""
Text3.Text = ""




Is This A Good Question/Topic? 0
  • +

Replies To: Update a combobox without closing it ... Database

#2 tlhIn`toq  Icon User is online

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5441
  • View blog
  • Posts: 11,676
  • Joined: 02-June 10

Re: Update a combobox without closing it ... Database

Posted 13 October 2012 - 02:00 PM

Are you sure this is VB6 and not VB.NET?
Are you really doing this in a basically dead language that is only used for support of legacy applications?
Was This Post Helpful? 0
  • +
  • -

#3 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: Update a combobox without closing it ... Database

Posted 17 October 2012 - 02:09 PM

So, same as in your other post, only more so. First, use a command object to insert your record. Then, open your recordset as a separate process. Then, tie it to your combobox.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1