Link Criteria problem

B

barnimup

Hi.

I'm a teacher and have created a database for logging incidents at
school. I have a table of student names and a table of incidents.
They were originally joined by a numeric admin number.

The field names were [Adm_No] on the student name table and [Admin No]
on the incident table.

I could bring up a form on a specific individual using a VB expression
which had the following:

stLinkCriteria = "[Adm_No]=" & Me![Admin No] - this worked fine.

However the admin number for students has now been changed to a longer
text based ID. eg. V1234567P9

Now whenever I try to bring up the individual form it just brings up
an error window "Enter Parameter Value" and then the new text admin
number. Clicking through this brings up the form but with blank
information.

Can anybody help me correct the stLinkCriteria so that it links the
tables correctly again?

thanks for any help that you can give me.
Chris
 
B

Bob Quintal

(e-mail address removed)
m:
Hi.

I'm a teacher and have created a database for logging incidents at
school. I have a table of student names and a table of incidents.
They were originally joined by a numeric admin number.

The field names were [Adm_No] on the student name table and [Admin
No] on the incident table.

I could bring up a form on a specific individual using a VB
expression which had the following:

stLinkCriteria = "[Adm_No]=" & Me![Admin No] - this worked fine.

However the admin number for students has now been changed to a
longer text based ID. eg. V1234567P9

Now whenever I try to bring up the individual form it just brings
up an error window "Enter Parameter Value" and then the new text
admin number. Clicking through this brings up the form but with
blank information.

Can anybody help me correct the stLinkCriteria so that it links
the tables correctly again?

thanks for any help that you can give me.
Chris
the expression parser needs some quotes aroung the passed text value
[Adm_No]="V1234567P9" , but the whole expression also needs to be in
quotes.

stLinkCriteria = "[Adm_No]=""" & Me![Admin No] & """"

Note that to embed a double quote, you have to double it up.
 
B

barnimup

(e-mail address removed)
m:


I'm a teacher and have created a database for logging incidents at
school. I have a table of student names and a table of incidents.
They were originally joined by a numeric admin number.
The field names were [Adm_No] on the student name table and [Admin
No] on the incident table.
I could bring up a form on a specific individual using a VB
expression which had the following:
stLinkCriteria = "[Adm_No]=" & Me![Admin No] - this worked fine.
However the admin number for students has now been changed to a
longer text based ID. eg. V1234567P9
Now whenever I try to bring up the individual form it just brings
up an error window "Enter Parameter Value" and then the new text
admin number. Clicking through this brings up the form but with
blank information.
Can anybody help me correct the stLinkCriteria so that it links
the tables correctly again?
thanks for any help that you can give me.
Chris

the expression parser needs some quotes aroung the passed text value
[Adm_No]="V1234567P9" , but the whole expression also needs to be in
quotes.

stLinkCriteria = "[Adm_No]=""" & Me![Admin No] & """"

Note that to embed a double quote, you have to double it up.

worked just fine. thanks very much.
 

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