Advertisement

07.01.2008 at 09:18PM PDT, ID: 23532469
[x]
Attachment Details

Public Function to open a form using link criteria from another form

Asked by Ludique in Access Coding/Macros

Tags: VB, Access 2003

I'm trying to create a public function that I can call from a control on any form to open another form and set the link criteria, but I'm stuck on the Link Criteria bit - please see snippet below.
.
.
.
From the calling form I'd like to use something like this:

Call OpenLinkForm("OrderList", "frmOrder", "OrderID", "OrderID")Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
Public Function OpenLinkForm(xForm As String, yForm As String, xCtl As String, yCtl As String)
    
       ' xForm is the the calling form
       ' yForm is the form to be opened
       ' xCtl is the control on the calling form to be used as link criteria
       ' yCtl is the control to link to on the form to be opened
        
        stLinkCriteria '=  I need something like  where yForm.yCtl = xForm.xCtl
        
        DoCmd.OpenForm yForm, , , stLinkCriteria
            
 
    End Function
[+][-]07.01.2008 at 11:24PM PDT, ID: 21913901

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Access Coding/Macros
Tags: VB, Access 2003
Sign Up Now!
Solution Provided By: jpaulino
Participating Experts: 1
Solution Grade: B
 
 
[+][-]07.02.2008 at 10:44AM PDT, ID: 21918824

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 11:13AM PDT, ID: 21919067

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 03:37AM PDT, ID: 21932189

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 03:59AM PDT, ID: 21932283

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 03:59AM PDT, ID: 21932285

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.22.2008 at 12:34AM PDT, ID: 22057057

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 - Hierarchy / EE_QW_2_20070628