Remove Data From Field

W

WDP

I have records in a TABLE that look like the following:

Jklebowski (Logged Out)
lawilliams (Logged Out)

etc.....

I am looking for a way (within a QUERY) to remove the (Logged Out) from each
record.

If it helps at all....The words (Logged Out) are always at the END of the
record....and always follows the Username and a single space


Can anyone help me with the syntax required to eliminated this "piece" of
each record??

Thank you

Warren Phillips
 
R

raskew via AccessMonster.com

Lookup the Split() function. Split the field at the "(" character.

HTH - Bob
 
J

John W. Vinson

I have records in a TABLE that look like the following:

Jklebowski (Logged Out)
lawilliams (Logged Out)

etc.....

I am looking for a way (within a QUERY) to remove the (Logged Out) from each
record.

If it helps at all....The words (Logged Out) are always at the END of the
record....and always follows the Username and a single space


Can anyone help me with the syntax required to eliminated this "piece" of
each record??

Permanently and irrevokably remove it from the table?

Run an Update query updating the field to

Left([fieldname], InStr([fieldname], "(Logged Out)") - 1)

If you want to leave the data in the field but just not display it, use a
Select query with this expression as a calculated field.
 
W

WDP

John:

EXACTLY.....what I needed.

Thank you





John W. Vinson said:
I have records in a TABLE that look like the following:

Jklebowski (Logged Out)
lawilliams (Logged Out)

etc.....

I am looking for a way (within a QUERY) to remove the (Logged Out) from each
record.

If it helps at all....The words (Logged Out) are always at the END of the
record....and always follows the Username and a single space


Can anyone help me with the syntax required to eliminated this "piece" of
each record??

Permanently and irrevokably remove it from the table?

Run an Update query updating the field to

Left([fieldname], InStr([fieldname], "(Logged Out)") - 1)

If you want to leave the data in the field but just not display it, use a
Select query with this expression as a calculated field.
 
Top