|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Access 2000
Hi,
Can anyone point me in the right direction? I have the following code: Set rs = db.OpenRecordset("select * from Batches where Batches.Table = " & "'olpl'") With rs .Edit !Post = True .Update End With I keep getting a message that there is no record to update. There should be a record. I stepped through the code and can't understand where the problem is. Appreciate any help. |
|
#2
|
|||
|
|||
|
Hi,
Your querie's just a little wrong. Here's how it should look: select * from olpl You actually specify the table name just after the from keyword, so its like select [fields] from [tablename] where [clause]
__________________
i am cope. i drink coke. i am in hope.i am cope. i drink coke. i am in hope.i am cope. i drink coke. i am in hope. |
|
#3
|
|||
|
|||
|
Try using something like this after setting the recordset:
IF RS.Recordcount > 0 then rs.movefirst rs.edit ....... rs.updtae else msgbox "No records found" End If Access 2000 works a little funny. Sometimes you have a recordset of, say, 10 records and it thinks there is only one record. To get the real number of records you have to do something like this: rs.movelast rs.movefirst However, Access can tell if there are any records or not, it just can't tell the actual amount right away. |
|
#4
|
|||
|
|||
|
Thank you for the help!
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Access 2000 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|