15,898,879 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by ionline4u (Top 7 by date)
ionline4u
29-Jun-14 12:29pm
View
I have update my code but it still give me error "No value given for one or more required parameters."
The Code is given below
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim cmd1 As New OleDbCommand
Dim adapter1 As New OleDbDataAdapter
Dim dt As New DataTable
con.Open()
cmd1.Connection = con
cmd1.CommandText = "SELECT EleMeeterNo FROM SrceElectricity WHERE Home/Office ='" & ComboBox1.Text & "'"
cmd1.CommandType = CommandType.Text
adapter1.SelectCommand = cmd1
adapter1.Fill(dt)
ComboBox2.DataSource = dt
ComboBox2.ValueMember = "Home/Office"
ComboBox2.DisplayMember = "Home/Office"
End Sub
ionline4u
29-Jun-14 8:02am
View
Deleted
I have made some changes according to your instruction.but when i select any item in the 1st combobox ,the 2nd combobox shows only 1st item .The code i have update is given below.
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim dt As New DataTable
Dim cmd1 As OleDbCommand = New OleDbCommand("SELECT * FROM SrceElectricity", con)
Dim mda1 As OleDbDataAdapter = New OleDbDataAdapter(cmd)
cmd.Connection = con
cmd.CommandText = "SELECT EleMeeterNo FROM SrceElectricity WHERE Home/Office ='" & ComboBox1.Text & "'"
cmd.CommandType = CommandType.Text
mda1.SelectCommand = (cmd1)
mda1.Fill(dt)
ComboBox2.DataSource = dt
ComboBox2.ValueMember = "EleMeeterNo"
ComboBox2.DisplayMember = "EleMeeterNo"
End Sub
ionline4u
13-Jun-14 14:17pm
View
but my project is in vb.net Please give me the code examples in VB.
ionline4u
12-Jun-14 14:54pm
View
yes you are correct .it is datagridview. Please guide me.
ionline4u
12-Jun-14 0:30am
View
it is vb form with MS Access db.i put it through toolbox and bend it to ms access to ms access table.Now i Just required a guide line to save data from this table into Access.
ionline4u
7-Jun-14 3:40am
View
Now for this problem i have an idea that when the last date is extended, i will also extend the last date manually.What is your suggestion
ionline4u
7-Jun-14 3:38am
View
It is due to the demand of the worker.anyway let assume that it is only from 16 to 15 then what will by your suggestion.Thanks
Show More