Extract numeric data from column

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have an access table with a column containing the folowing data as shown
below:

gooduser
complete (0 pages)

gooduser
complete (2 pages)

gooduser
complete (0 pages)

gooduser
complete (2 pages)

exceededquota (user mailed)

The page count is diferent for most records. The syntax however is the same
each time. Sometimes in the column other things come up such as
'exceededquota'.
What I need is to read the number in the brackets and add each number up to
make a total. I was thinking maybe some VB would do it but dont know how to
write it. If anyone can help in anyway it will be greatly valued.

Nathan Goddard
 
Hi
I have an access table with a column containing the folowing data as shown
below:

gooduser
complete (0 pages)

gooduser
complete (2 pages)

gooduser
complete (0 pages)

gooduser
complete (2 pages)

exceededquota (user mailed)

I'm not quite clear what data is in what field. Do you want to extract
the "gooduser" text, or just the number?

If just the number, a calculated field

Pages: Val(Mid([fieldname], InStr([fieldname], "(") + 1))

should work.


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top