For new user a quick word of caution to try and avoid one potential headache when using built-in functions within a query.
For instance:
Let say you with to use an update query to standardize the text in a field so that it is ‘Proper Cased’ (IE: capitalize the first character of each word – Good for Names, Address Info,… ), you would use the StrConv() function.
Now in VBA you would do something like:
StrConv("joHn HOLMEs", vbProperCase)
However, if you were to use the same in the QBE when building your query for a field named “client_name”, you would see that Access would automatically place the vbProperCase between quotes, like:
StrConv([client_name], "vbProperCase")
and if you ran your update query like this, you would end up with blanked fields. Yes, you would actually lose your data. I know, because I once made the mistake.
So what is the solution? It is quite simple actually! The QBE does not seem to have access to the built-in VBA constant values. As such, instead of using the built-in VBA constant values, you need to replace them by their literal values. In this case, 3. So our code would become:
StrConv([client_name], 3)