Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search in Text field for a particular character

Status
Not open for further replies.

cantona

Technical User
May 20, 2001
121
GB
I have a text field that holds attendance data for a person in a given year. The Field will always be 52 characters long. One for each week in the year. What I would like to do is search from the right hand side of the string and return the first “/” which is the code for present. In theory this would give me the last time a person was present. I would like to return this as the character position. For example if the 49th character in the string contains “/” , the last known attendance for this person would be week 49. What would be the easiest way of achieving this?
 
Check out the InStr & InStrRev functions in Access help.

10 is company, 11 is a crowd
 
Have you every considered normalizing your table structure so you aren't storing multiple data values in a single field/record?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hi genomon,

Thanks, managed to get it working using InStrRev.

Dhookhom, Im not using a database created by myself, it is a bought in package so have to work with what ive got!
 




genomon,

Did you read where a group, touring a toothpaste factory, got trapped in an ice locker? The headline was...

Tooth Company Freeze a Crowd!


Skip,
[sub]
[glasses] To be safe on the [red]FOURTH[/red],
Don't take a [red]FIFTH[/red] on the [red]THIRD[/red]
Or you might not come [red]FORTH[/red] on the [red]FIFTH[/red]
[red][highlight blue]FORTH[/highlight][/red][white][highlight red]WITH[/highlight][/white] [tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top