Expression syntax for 'includes/contains' ? (1 Viewer)

Philocthetes

Has a great deal to learn
Local time
Yesterday, 22:28
Joined
Dec 19, 2017
Messages
28
Hi folks,


I've got a pair of fields in a table and I want to ID all the rows where the string in All Degrees includes the number in Year_Published.



The stabbing around in the UI and Help leaves me thinking it might not be possible with an expression and maybe I need to use VB?
 

June7

AWF VIP
Local time
Yesterday, 21:28
Joined
Mar 9, 2014
Messages
5,424
Quite possibly.

Post example data and example desired output.
 

Philocthetes

Has a great deal to learn
Local time
Yesterday, 22:28
Joined
Dec 19, 2017
Messages
28
Hi June7,


The Degrees and Year columns are from my dataset. the Match column looks how I wish I could make it look.



I'm hoping for code to tell me whether or not the value in the Year column is present in Degrees.



Degrees Match Year MS EG 1949 Yes 1949 BS LS CY 1949; MS LS 1950; PHD LS CY 1953 Yes 1950 BA ED 1951; MA ED MAE 1952 Yes 1952 BSA AG IS 2004; MS AG EY 2013 No 1978
 

isladogs

MVP / VIP
Local time
Today, 05:28
Joined
Jan 14, 2017
Messages
18,186
In your query, add criteria for the Year field: CInt(Right(Degrees,4))
 

Philocthetes

Has a great deal to learn
Local time
Yesterday, 22:28
Joined
Dec 19, 2017
Messages
28
In your query, add criteria for the Year field: CInt(Right(Degrees,4))


Hi Ridders,


Sorry the table came across like crap. It looked fine in this WSYWIG. I can't use a fixed character number because the Degree strings are quite variable. Unfortunately, the source I was given lumps all degrees into one field, so some rows have only a single year many have three and there are most likely a handful with four or five.


p.s. If it helps, I'm trying to match the publication years of master's theses, but the degree field can include undergrad, master's, doctorate, and multiples thereof.
 

isladogs

MVP / VIP
Local time
Today, 05:28
Joined
Jan 14, 2017
Messages
18,186
It looked fine from the data you displayed (not very well)

In that case, scrap what I said before and set the criteria for the Degrees field to: Like "*" & [Year] & "*"

If still not OK, please post a screenshot showing the 2 columns with some representative data
 

Users who are viewing this thread

Top Bottom