Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

updating MS Access using ADO

Status
Not open for further replies.

Poloboy

Technical User
Aug 26, 2002
58
US
Hi,
Can someone show how this work. I have
rs.fields(2)= rs.fields(2) - 1 this works fine but if I do the other way around it won't update the record rs.fields(2)
rs.fields(2) = rs.fields(2) + 1 <-this won't update the fields.

Thank you!
 
Is the field to which rs.Fields(2) refers perchance a unique field? If it is then
[tt]
rs.fields(2)= rs.fields(2) - 1
Old Value New Value
1 0
2 1
3 2
[/tt]
No problem

But
[tt]
rs.fields(2)= rs.fields(2) + 1
Old Value New Value
1 2 [red]<-- Duplicate value[/red]
2 [red]<--- There's already a 2 in the table[/red]
3
[/tt]
 
There are no unique key for the field.
 
Do you get any errors when you do this or is the field value just not changing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top