473,473 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

combobox problem

140 New Member
hi all

tablename-sequence
formname sequence
fieldname (sequence)

How to retrieve the value from sequence table to form 5 where i ve combobox (sequence). i want the vlue to come to this combo.
Jan 31 '07 #1
4 1205
hariharanmca
1,977 Top Contributor
hi all

tablename-sequence
formname sequence
fieldname (sequence)

How to retrieve the value from sequence table to form 5 where i ve combobox (sequence). i want the vlue to come to this combo.

Dim i As Integer
Dim strSql As String
Dim rs1 As ADODB.Recordset
Dim strSql as string
Set rs1 = New ADODB.Recordset
strSql = ""
strSql = "select fldSequence, fldSequenceId from tblSequence"
rs1.Open strSql, Conn, adOpenKeyset, adLockOptimistic
For i = 1 To rs1.RecordCount
cmbSequence.AddItem Trim(rs1.Fields("fldSequence"))
cmbSequence.ItemData(cmbSequence.NewIndex)=rst1.Fi elds("fldSequenceId")
rs1.MoveNext
Next i

Use this Code
Jan 31 '07 #2
indhu
140 New Member
Dim i As Integer
Dim strSql As String
Dim rs1 As ADODB.Recordset
Dim strSql as string
Set rs1 = New ADODB.Recordset
strSql = ""
strSql = "select fldSequence, fldSequenceId from tblSequence"
rs1.Open strSql, Conn, adOpenKeyset, adLockOptimistic
For i = 1 To rs1.RecordCount
cmbSequence.AddItem Trim(rs1.Fields("fldSequence"))
cmbSequence.ItemData(cmbSequence.NewIndex)=rst1.Fi elds("fldSequenceId")
rs1.MoveNext
Next i

Use this Code

No hari, its not working
Jan 31 '07 #3
hariharanmca
1,977 Top Contributor
No hari, its not working
Where and how you are useing that combo box
Jan 31 '07 #4
Killer42
8,435 Recognized Expert Expert
Where and how you are useing that combo box
Yes, we definitely need more detail. Is this standalone Visual Basic? If so, what version? Is it a VBA module in Access? Perhaps you are simply working on a Form in Access, with no VB involved?

Plus, more detailed info about the tables/fields involved would be useful. Try to describe the situation in as much detail as you can manage.
Feb 1 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Chandra | last post by:
Hello Sir, This is Chandra and Working as Software Engineer. I got a really weird problem with ComboBoxes. I have set the ComboBox DroppedDown Property to true. Now the actual problem is...
7
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
1
by: anonymous | last post by:
I've been trying to put a them, please help me out. Here's the major parts of my code: public Form1() { DataSet myDataSet = new DataSet("myDataSet"); DataTable testTable = new...
3
by: TT (Tom Tempelaere) | last post by:
Hay there, I'm writing my own DataGridComboBoxColumn because .NET 1.1 does not have one (I hope .NET 2.0 supplies one). I based it on this article:...
0
by: tupolev | last post by:
Hi, I already post this item but now I know whats wrong: I want to allow the user to edit the items in a combobox. The problem is that the textchange event works just one time (for the first...
4
by: Keith | last post by:
Hello - this started out as a minor annoyance - and now is starting to bother me more and more - I'm hoping someone can help me. I would like to have a combobox display - NOT initially be blank...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
5
by: Peter M. | last post by:
I'm struggling with combobox databinding with something I consider a bug... I'm binding my combobox to an array of structs. The struct exposes two public properties, ID and Name, to be used as...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.