Format text

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

Guest

I have a field "REF" where the first part of the text is common but the text
in brackets is not. The text lenght varies as well:

REF
Application progess (oc:Mr C Battin)
Application progess (oc:Lisa Addyman)
Initial Contact (oc:David Wright)
Application Form Received (oc:David Wright)
Follow up UK (oc:S Squires)
Application Form Received (oc:S Squires)
Application progess (oc:Mr Michael Mullamy)

How can I format the text in a new query to remove everything from " ("
onwards?

Thanks in advance.

John
 
Use Instr() to locate the opening bracket, and Left() to get the preceeding
characters:
Left([Field1], Instr([Field1], "(") - 1)
 
Allen,

Many thanks, that works perfectly. It's one I think I'll be using a lot!

John

Allen Browne said:
Use Instr() to locate the opening bracket, and Left() to get the preceeding
characters:
Left([Field1], Instr([Field1], "(") - 1)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

JohnP said:
I have a field "REF" where the first part of the text is common but the
text
in brackets is not. The text lenght varies as well:

REF
Application progess (oc:Mr C Battin)
Application progess (oc:Lisa Addyman)
Initial Contact (oc:David Wright)
Application Form Received (oc:David Wright)
Follow up UK (oc:S Squires)
Application Form Received (oc:S Squires)
Application progess (oc:Mr Michael Mullamy)

How can I format the text in a new query to remove everything from " ("
onwards?

Thanks in advance.

John
 
Back
Top