Getting extra text data out of field records....

  • Thread starter Thread starter DPCpresto
  • Start date Start date
D

DPCpresto

OK, I really screwed the pooch on this one...anyway, I have a database that I use for practice (thank God) in working through and teaching myself stuff, but I recently messed it up good. In it, I have a field named (e-mail address removed)
 
Create a command button and copy the following code into an On_Click even
i tested it, it should work, remember to change "Name" and "table1" to the name that you specifi

Dim rst As New ADODB.Recordset ' assume table called "table1
Dim position As Integer 'field name called "name
rst.Open "table1", CurrentProject.Connection, adOpenKeyset, adLockOptimisti
Do Until rst.EO
position = InStr(rst!Name, "#"
If position <> 0 The
rst!Name = Left(rst!Name, position - 1
rst.Updat
End I
rst.MoveNex
Loo

Edmun
MCP - Access and SQL Serve

----- DPCpresto wrote: ----

OK, I really screwed the pooch on this one...anyway, I have a database that I use for practice (thank God) in working through and teaching myself stuff, but I recently messed it up good. In it, I have a field named (e-mail address removed)
 
Back
Top