Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / October 2007

Tip: Looking for answers? Try searching our database.

Help with stLinkCriteia for multiple fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JHC - 31 Oct 2007 16:32 GMT
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?
Douglas J. Steele - 31 Oct 2007 16:49 GMT
Try simply Me.Parent![cbo_Application_Acronym]

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(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
[quoted text clipped - 11 lines]
>
> The syntax for this string baffles me.  Any idea on how to make this work?
JHC - 31 Oct 2007 17:13 GMT
It still requests:  Enter parameter value Application_Acronym.  But the
Me.Parent![cbo_Application_Acronym] does contain the correct value.  

> Try simply Me.Parent![cbo_Application_Acronym]
>
[quoted text clipped - 13 lines]
> >
> > The syntax for this string baffles me.  Any idea on how to make this work?
Douglas J. Steele - 31 Oct 2007 17:27 GMT
Are you sure that Application_Acronym is in the underlying recordset of
Form_2 (and that that's the correct typing of its name)?

Signature

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

> It still requests:  Enter parameter value Application_Acronym.  But the
> Me.Parent![cbo_Application_Acronym] does contain the correct value.
[quoted text clipped - 18 lines]
>> > The syntax for this string baffles me.  Any idea on how to make this
>> > work?
JHC - 31 Oct 2007 19:00 GMT
Ouch...  You are correct.  I did not spell the column name correctly.  Sorry
for the trouble and THANK YOU!!!
-JHC

> Are you sure that Application_Acronym is in the underlying recordset of
> Form_2 (and that that's the correct typing of its name)?
[quoted text clipped - 21 lines]
> >> > The syntax for this string baffles me.  Any idea on how to make this
> >> > work?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.