Trever B said:
Thanks Mike
Have tried the following but it does not like "rs.edit" for Info
running windows nt
Can you please help me get it right.
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("Directions")
rs.MoveFirst
Do While Not rs.EOF
rs.Edit 'does not like this
why? rs!Dir = UCase(rs!Dir)
rs.Update
rs.MoveNext
Loop
rs.Close
Your problem is probably because Access thinks rs is an ADODB recordset
(which doesn't have an Edit method), not a DAO recordset. So declare it
more explicitly:
Dim rs As DAO.Recordset
Note two things:
1. The line ...
.... is unnecessary in this case, since the freshly opened recordset will
be positioned at the first record, if there is one. In fact, calling
MoveFirst when the recordset is empty will cause an error.
2. As others have said, for this particular process, an update query
would be *much* more efficient. Of course, there can be times when an
update query isn't appropriate or feasible, but it's always a good idea
to look for an SQL solution first.