stLinkCriteria with alphanumeric fields

eduardo

Registered User.
Local time
Yesterday, 23:48
Joined
Jul 5, 2012
Messages
67
Hi, I just gave up trying myself so I came here:

I have two different tables that have one field in common, it looks like this:
A-123

I'm tyring to write a stLinkCriteria so when I double-click on that field in Table1 it will take me to the matching record of Table2

So I'm on the form of Table 1 and I double-click on "Code" field
stLinkCriteria = "[Token]=" & Me!
Code:
 & "" 
[/COLOR]
But that doesn't work. :confused:

I appreciate a suggestion on this matter. Thanks.
 
Solved.

It's funny, I tried myself 30 minutes with no luck.
5 minutes after I posted it, I figured it out! lol

For the record, solution was this
stLinkCriteria = "[Token]=" & "'" & Me!
Code:
 & "'"

Thanks!!
 
The way to catch this kind of problem is to stop Access in debug on the next line and look at stLinkCriteria. At that point you would probably notice that there were not quotes or apostrophes around your code
 

Users who are viewing this thread

Back
Top Bottom