updating table data from form list box

wasim

Registered User.
Local time
Today, 08:42
Joined
Jun 10, 2016
Messages
19
I have issue with updating table data from form. Form is with list box. I want to update the table from below code:
Current db.execute "UPDATE POSITIONAPPLIED SET POSITIONAPPLIED.PEVALID = " & Me.EVALID _
& " WHERE (((POSITIONAPPLIED.POSITIONAPPLIEDID)= " & Me.lsthosp.Column(0, i) & ") And ((POSITIONAPPLIED.APPLICATIONID)= " & Me.lsthosp.Column(3, i) & "));", dbFailOnError

But it updates all the lines in the table. I want to update only the pertilcular line where the above conditon meets. Why this updates all the records in the table?

Please help me out.

wasim
 
think you need to show the whole code - the 'i' implies a loop of some sort
 
Hi,

if i remove' i' it gives me error message. Is there some otherway to update the table ?
 
I wasn't suggesting you remove the I.

I'm suggesting there is more code - how does I get assigned a value for example.

You are asking for help, but leaving us guessing where the problem is because you have only shown where you think the problem is.

If you are not prepared to show the whole code for the event that the one line you have provided is triggered, then I regret I cannot help
 

Users who are viewing this thread

Back
Top Bottom