Re: Using the $ after functions



So For Example:

Dim AnyString, MyStr
AnyString = "Hello World" ' Define string.

mystring = Left$(AnyString)

I would not need to use the variant that defined how many characters from
the left I wanted it would return the entire string?


--
Ken


"Alex Dybenko" wrote:

Hi,
functions, which ends with $ returns string, without - variant, in general,
for query expressions - I suggest to use variant type
For code - it depends on what type of variables you are using

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com


"TheUbe" <TheUbe@xxxxxxxxxxxxxx> wrote in message
news:D8965E67-AF2C-4A1B-9F56-CE3A8252CC36@xxxxxxxxxxxxxxxx
This is a general question...Is there any difference using a function in
the
expression builder that ends with the $ and one that does not?
--
Ken

.



Relevant Pages

  • Re: Code to delete/unlink Linked tables
    ... Public intLinkODBCTables As Variant, intLinkDB2Tables As Variant ... Public strLinkBackendDB As String, strLinkDSNname As String, strLinkLibName ... ' MsgBox "This database is in MDE format...I will delete/recreate ODBC ... Public Sub fncLinkDB2Table() ...
    (microsoft.public.access.modulesdaovba)
  • Re: Comparing a variant string with char*
    ... I understand what you are saying, but the above code compiles and runs ... A VARIANT type is not a string, and is not comparable to a string; ... There is no VARIANT type that can represent a char string, for example, although there is ...
    (microsoft.public.vc.mfc)
  • Re: OPENFILENAME A P I. User cancels ?
    ... The variable FName will be a Boolean False if no file was selected or a String containing the fully qualified file name if the user selectes a file. ... Const ahtOFN_OVERWRITEPROMPT = &H2 ... Function GetOpenFile(Optional varDirectory As Variant, ... Dim strFilter As String ...
    (microsoft.public.excel.programming)
  • RE: multi-select file dialog
    ... strCustomFilter As String ... Global Const ahtOFN_OVERWRITEPROMPT = &H2 ... Dim strFilter As String ... Function GetOpenFile(Optional varDirectory As Variant, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Replace space in text file
    ... In four of the above cases you have specified which type of variable you want VB to create (Integer, Long, String or whatever). ... in the case of vChars you have not specified the required variable type and VB will therefore create it as a Variant. ... For example, if vChars was an Integer then VB would read two bytes from the file, and if it was a Long it would read four bytes, and if it was a standard variable length String which currently contained nine characters then it would read nine characters from the file and if it was a String that currently contained just one character then it would read one character from the file. ...
    (microsoft.public.vb.general.discussion)