stLinkCriteria

G

Guest

Can someone explain how this works?

stLinkCriteria = "([tablename].[fieldname])=" & "'" & Me![formfield] & "'"
(is this correct for text fields?)

My undertanding is that the me![formfield] is passed to the field
tablename.fieldname on the form you are trying to open thereby opening it by
that criteria only.

I'm trying to retrofit an application that has moved to SQL Server. I've
got all the data I need via ODBC links and have built new queries. This
piece (that use to work) is falling short.

Also, what's the difference between "Access Forms Coding and "Access Forms
Coding (office.access)"? I'm not sure what to post to.....
 
F

fredg

Can someone explain how this works?

stLinkCriteria = "([tablename].[fieldname])=" & "'" & Me![formfield] & "'"
(is this correct for text fields?)

My undertanding is that the me![formfield] is passed to the field
tablename.fieldname on the form you are trying to open thereby opening it by
that criteria only.

I'm trying to retrofit an application that has moved to SQL Server. I've
got all the data I need via ODBC links and have built new queries. This
piece (that use to work) is falling short.

Also, what's the difference between "Access Forms Coding and "Access Forms
Coding (office.access)"? I'm not sure what to post to.....

stLinkCriteria = "[FieldName] = ' " & Me![formfield] & " ' "
or..
stLinkCriteria = "[FieldName]= " & Chr(34) & Me![FieldName] & Chr(34)
& " "

The spaces between the quotes are for clarity only. Remove the spaces.
 

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