Help with stLinkCriteia for multiple fields

J

JHC

Form_1 has field Application_Acronym and a subform with field
DataElement_Name. I wish to link to Form_2 using both fields from a function
within the subform.

stLinkCriteria = "[DataElement_Name]=""" & Me![DataElement_Name] & _
""" And [Application_Acronym] = "" &
Me.Parent.Form![cbo_Application_Acronym] & """

The values for Me![DataElement_Name] and
Me.Parent.Form![cbo_Application_Acronym] are correct, but Access propmts for
the Application_Acronym parameter.

The syntax for this string baffles me. Any idea on how to make this work?
 
J

JHC

It still requests: Enter parameter value Application_Acronym. But the
Me.Parent![cbo_Application_Acronym] does contain the correct value.

Douglas J. Steele said:
Try simply Me.Parent![cbo_Application_Acronym]

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


JHC said:
Form_1 has field Application_Acronym and a subform with field
DataElement_Name. I wish to link to Form_2 using both fields from a
function
within the subform.

stLinkCriteria = "[DataElement_Name]=""" & Me![DataElement_Name] & _
""" And [Application_Acronym] = "" &
Me.Parent.Form![cbo_Application_Acronym] & """

The values for Me![DataElement_Name] and
Me.Parent.Form![cbo_Application_Acronym] are correct, but Access propmts
for
the Application_Acronym parameter.

The syntax for this string baffles me. Any idea on how to make this work?
 
D

Douglas J. Steele

Are you sure that Application_Acronym is in the underlying recordset of
Form_2 (and that that's the correct typing of its name)?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


JHC said:
It still requests: Enter parameter value Application_Acronym. But the
Me.Parent![cbo_Application_Acronym] does contain the correct value.

Douglas J. Steele said:
Try simply Me.Parent![cbo_Application_Acronym]

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


JHC said:
Form_1 has field Application_Acronym and a subform with field
DataElement_Name. I wish to link to Form_2 using both fields from a
function
within the subform.

stLinkCriteria = "[DataElement_Name]=""" & Me![DataElement_Name] & _
""" And [Application_Acronym] = "" &
Me.Parent.Form![cbo_Application_Acronym] & """

The values for Me![DataElement_Name] and
Me.Parent.Form![cbo_Application_Acronym] are correct, but Access
propmts
for
the Application_Acronym parameter.

The syntax for this string baffles me. Any idea on how to make this
work?
 
J

JHC

Ouch... You are correct. I did not spell the column name correctly. Sorry
for the trouble and THANK YOU!!!
-JHC

Douglas J. Steele said:
Are you sure that Application_Acronym is in the underlying recordset of
Form_2 (and that that's the correct typing of its name)?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


JHC said:
It still requests: Enter parameter value Application_Acronym. But the
Me.Parent![cbo_Application_Acronym] does contain the correct value.

Douglas J. Steele said:
Try simply Me.Parent![cbo_Application_Acronym]

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Form_1 has field Application_Acronym and a subform with field
DataElement_Name. I wish to link to Form_2 using both fields from a
function
within the subform.

stLinkCriteria = "[DataElement_Name]=""" & Me![DataElement_Name] & _
""" And [Application_Acronym] = "" &
Me.Parent.Form![cbo_Application_Acronym] & """

The values for Me![DataElement_Name] and
Me.Parent.Form![cbo_Application_Acronym] are correct, but Access
propmts
for
the Application_Acronym parameter.

The syntax for this string baffles me. Any idea on how to make this
work?
 

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