Update Error

Hi

I am trying to update a record and I keep getting an error message say "There is no record at position 0."
When the form loads all the information from the tables is displayed in a listveiw.
After that the use then selects the record the would like to update.
When they click the update button I get the above message.
Listed below is the code that i am using to update the record.


conDocsoft.Open()
With Me.DsAllergy1.ALLERGY(0)
.ALL_NAME = Me.txtAlleName.Text
.ALL_REACTION = Me.txtAllerReaction.Text
.ALL_TREATMENT = Me.txtAlleTreatment.Text
End With
adpAllergy.Update(Me.DsAllergy1)
conDocsoft.Close()

Please can some tell me where i am going wrong.

David

Comments

  • For some reason Me.DsAllergy1.ALLERGY is empty.

    You can try to verify by counting the number of records in that table?


    like Me.DsAllergy1.ALLERGY.Count() ??



    Tore Nestenius
    [blue][italic][b]/WEBMASTER[/b][/italic][/blue] Programmers Heaven
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion