|
|
Help with syntax.
I cant remember the syntax is the data is a number. Below is if the data is
text.
I wish this site kept my older posts I know I have asked this before.
stLink = "[OrderNum]=" & "'" & Me![OrderNum] & "'"
--
Matt Campbell
mattc (at) saunatec [dot] com
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1
|
|
0
|
|
|
|
Reply
|
mattc66
|
3/9/2010 4:20:35 PM |
|
Found it ...
For a numeric link
stLink = "[ShipID]=" & Me![ShipID]
mattc66 wrote:
>I cant remember the syntax is the data is a number. Below is if the data is
>text.
>I wish this site kept my older posts I know I have asked this before.
>
>stLink = "[OrderNum]=" & "'" & Me![OrderNum] & "'"
>
--
Matt Campbell
mattc (at) saunatec [dot] com
Message posted via http://www.accessmonster.com
|
|
0
|
|
|
|
Reply
|
mattc66
|
3/9/2010 5:06:08 PM
|
|
Numeric: (no quotes around value)
stLink = "[field] = " & Me![field]
String/Text: (quotes around value)
stLink = "[field] = """ & Me![field] & """"
Dates: (#'s around value)
stLink = "[field] = #" & Me.[field] & "#"
hth
--
Jack Leach
www.tristatemachine.com
"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
"mattc66 via AccessMonster.com" wrote:
> I cant remember the syntax is the data is a number. Below is if the data is
> text.
> I wish this site kept my older posts I know I have asked this before.
>
> stLink = "[OrderNum]=" & "'" & Me![OrderNum] & "'"
>
> --
> Matt Campbell
> mattc (at) saunatec [dot] com
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
3/9/2010 5:20:01 PM
|
|
On Tue, 09 Mar 2010 16:20:35 GMT, "mattc66 via AccessMonster.com" <u16013@uwe>
wrote:
>I cant remember the syntax is the data is a number. Below is if the data is
>text.
>I wish this site kept my older posts I know I have asked this before.
>
>stLink = "[OrderNum]=" & "'" & Me![OrderNum] & "'"
Just lose the extra quotes.
Date/Time fields must use # as a delimiter.
Text fields can use either " or ' as a delimiter.
Number and Currency fields use no delimiter at all.
stLink = "[OrderNum] = " & Me![OrderNum]
will work.
Note that you don't have to break out the leading ' delimiter for text fields;
it's just a character in the " delimited string constant, like = or ] or any
other character. You could (for text fields) use
stLink = "[OrderNum] = '" & Me![OrderNum] & "'"
Note also that if the string you're using might contain an apostrophe, you
shouldn't use ' as a delimiter since the apostrophe will be seen as a
premature closing quote. You can use " in a string by doubling it up - two
consecutive doublequotes in a doublequote delimited string will be translated
to a single doublequote (yes, I know, doubletalk):
stLink = "[LastName] = """ & Me!txtLastName & """"
will allow for a construct like
[LastName] = "O'Reilly"
--
John W. Vinson [MVP]
|
|
0
|
|
|
|
Reply
|
John
|
3/9/2010 5:23:26 PM
|
|
|
3 Replies
171 Views
(page loaded in 0.072 seconds)
Similiar Articles: Help with syntax while using the expression builder within a query ...I am so hoping someone can help me with something that should be very very easy! I am trying to calculate some dates but, need to find the business ... Help with wildcard Replace syntax, please? - microsoft.public.word ...You must enter into the Replace box exactly what it is that you want to be used as the replacement Though, you could have used ([ ]{4}) [0-9]{2} in the Find ... vlookup from two sources - syntax of vlookup statement - microsoft ...Simple function giging me a syntax error, please help! - microsoft ... Simple function giging me a syntax error, please help! - microsoft ... vlookup from two sources ... Help with IF statement check value in multiple cells - microsoft ...I am trying to use an if statement that checks for a value across multiple cells and I can't seem to get it to work. I am not sure if I am supposed... Iif Statement help - microsoft.public.accessHi, basically i need a soltuion which is a huge Iif statement ibelieve maybe a nested Iif staement.OK basically i want the statement to be like this:I... Report Sum If <= - microsoft.public.access.reportsI want to make a report from a query that extracts coded events L, LX etc and the hours associated with these codes. I need help with the correct syntax for this ... Multiple IIf statements - microsoft.public.accessAccess 2003 multiple if then statement help - microsoft.public ... Multiple IIf statements - microsoft.public.access Access 2003 multiple if then statement help ... DMax Syntax (?) - microsoft.public.access.formscodingHelp with: ...query that does not include specified expression ... Your SQL syntax if invalid. To use MAX() you need a SELECT clause and a FROM clause. ... Comma in query expression - microsoft.public.access.queries ...Syntax error (comma) in query expression I keep getting this error can anyone help me find the error. I have been searching for two days. Any help is greatly appreciated. LDAP Connections in Visual Basic For Application. - microsoft ...... within active directory of the current user - I have been told this can be done by the IT management within my organisation, but they are unable to help me with syntax ... Wikipedia:WikiProject Wiki Syntax - Wikipedia, the free encyclopediaThis was done in case these items represented problems in the syntax checker itself, but no such problems were found - rather the items were mostly hard-to-spot errors ... Visual Basic :: Help With Syntax - BigResource: Webmaster Scripts ...Help With Syntax Can you tell me what is wrong with the syntax in the update statement? Private Sub updateUser() Dim rs As DAO.Recordset db.Execute "UPDATE userfile ... Syntax - English sentence structure - A guide to learning EnglishIntroduction: This page contains some basic information about sentence structure (syntax) and sentence types. It also includes examples of common sentence problems in ... Helping ESL students understand written textsMany ESL students, often with their parents’ help, waste a great deal of precious ... but when they occur in combination - such as in texts with complex syntax and ... Crafty Syntax Live HelpOpen source live support software featuring proactive shat invites to allow companies to talk to the visitors at their website in real time. Features include: canned ... 7/25/2012 9:29:32 AM
|
|
|
|
|
|
|
|
|