Text Queries for Lower Upper and Proper

J

Jeff

Hi All

Is there any way to right a query so that it will look for the text string
in lower, UPPER and Proper?

I want to have a textbox - "TextEntry" - and regardless of what the user
enters I would like to run a query on both upper, lower and proper
variations of the text string.

Having trouble figuring this one out - I know you can use UCase and LCase
to convert TextEntry.Value to both lower and upper case strings that I can
pass to a query but I am not sure about proper and I am not sure if there is
a simple way to get this done.

Also - is there any way to pass a variable to a query - I mostly use Access
Query design view - and I cant seem to pass a variable to a query - just a
reference to a field on a form - Forms!CampaignRecords!TextEntry.Value.

Thanks for everyone's input and response,

Jeff
 
G

Guest

To reference the textbox from the form in your query, create a new column and
under field type 'Expr: Forms!CampaignRecords!TextEntry' (minus the single
quotes) this will show a a new column in your query called Expr with whatever
value is in TextEntry from your form.

To restrict your query to the value in TextEntry, in the criteria field type
'Forms!CampaignRecords!TextEntry' (minus the single quotes).

In order to restrict the query to the value entered in TextEntry,
irrespective of whether it's Upper, Lower or Proper case, create a new column
with a Field 'Expr: UCase([tblName].[fldName]' (minus the single quotes and
replacing tblName and fldName with your table and field names) and criteria
'UCase(Forms!CampaignRecords!TextEntry)' (again minus the single quotes).

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top