|
-
Feb 27th, 2010, 07:32 AM
#3
Thread Starter
Fanatic Member
Re: Fill combobox depending on value of other combo
 Originally Posted by VBDT
On which line is the error?
I think in the select statement the "Me.cboLand.SelectedItem" is wrong. it should be "CInt(Me.cboLand.SelectedValue)" if Land_ID type is integer.
Thanks for the quick reply.
When I use CInt(Me.cboLand.SelectedValue), the error is on line
Dim adapter As New OleDbDataAdapter("SELECT Staat_ID,Staat FROM tblSTAAT WHERE Land_ID = " & Me.cboLand.SelectedItem, connection)
The error reads: Conversion of type DataRowView to type integer is not valid.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|