Link to home
Start Free TrialLog in
Avatar of grwallace
grwallace

asked on

Selecting data by code into a tableadapter

I have generated a quick sample program which works fine:-
Public Class Form1

    Private Sub AdmasBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Me.Validate()
        Me.AdmasBindingSource.EndEdit()
        Me.AdmasTableAdapter.Update(Me.PIComtass02DataSet.Admas)

    End Sub


    Private Sub AdmasBindingNavigatorSaveItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AdmasBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.AdmasBindingSource.EndEdit()
        Me.AdmasTableAdapter.Update(Me.PIComtass02DataSet.Admas)

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
.

        Me.PlmasTableAdapter.Fill(Me.PIComtass02DataSet.Plmas)
              Me.AdmasTableAdapter.Fill(Me.PIComtass02DataSet.Admas)

    End Sub
End Class

This brings a complete list in which I can page through. What I need to be able to do is change the input query to select a single record by adding a " WHERE AccountNo = " condition to the select statement in the program.
Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of VBRocks
VBRocks
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial