 			specimen_event.collecting_event_id=collecting_event.collecting_event_id and
 			collecting_event.locality_id=locality.locality_id and
 			locality.geog_auth_rec_id=geog_search_term.geog_auth_rec_id and
-      		upper(geog_search_term.search_term) like '%#ucase(escapeQuotes(any_geog))#%'
+      		upper(geog_search_term.search_term) like '%#ucase(escapeQuotes(any_geog2))#%'
 		UNION
 			select
 				specimen_event.collection_object_id

				specimen_event,collecting_event
			where
				specimen_event.collecting_event_id=collecting_event.collecting_event_id and
				upper(verbatim_locality) LIKE '%#ucase(escapeQuotes(any_geog))#%'
	)">
</cfif>


			where
				specimen_event.collecting_event_id=collecting_event.collecting_event_id and
				collecting_event.locality_id=locality.locality_id and
				upper(spec_locality) LIKE '%#ucase(escapeQuotes(any_geog2))#%'
		UNION
			select
				specimen_event.collection_object_id
