A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Help with stLinkCriteia for multiple fields



 
 
Thread Tools Display Modes
  #1  
Old October 31st, 2007, 03:32 PM posted to microsoft.public.access.forms
JHC
external usenet poster
 
Posts: 19
Default Help with stLinkCriteia for multiple fields

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?
  #2  
Old October 31st, 2007, 03:49 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Help with stLinkCriteia for multiple fields

Try simply Me.Parent![cbo_Application_Acronym]

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"JHC" wrote in message
...
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?



  #3  
Old October 31st, 2007, 04:13 PM posted to microsoft.public.access.forms
JHC
external usenet poster
 
Posts: 19
Default Help with stLinkCriteia for multiple fields

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

"Douglas J. Steele" wrote:

Try simply Me.Parent![cbo_Application_Acronym]

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"JHC" wrote in message
...
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?




  #4  
Old October 31st, 2007, 04:27 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Help with stLinkCriteia for multiple fields

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
http://I.Am/DougSteele
(no e-mails, please!)


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

"Douglas J. Steele" wrote:

Try simply Me.Parent![cbo_Application_Acronym]

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"JHC" wrote in message
...
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?






  #5  
Old October 31st, 2007, 06:00 PM posted to microsoft.public.access.forms
JHC
external usenet poster
 
Posts: 19
Default Help with stLinkCriteia for multiple fields

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

"Douglas J. Steele" wrote:

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
http://I.Am/DougSteele
(no e-mails, please!)


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

"Douglas J. Steele" wrote:

Try simply Me.Parent![cbo_Application_Acronym]

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"JHC" wrote in message
...
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?






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.