Solved

Access 2010 Drill Down to Another Form

Posted on 2014-09-14
8
243 Views
Last Modified: 2014-09-14
I have a form (frm_Accounting_Transactions) with a field (Fund_Map) that has multiple values separated by commas (EC,EG,EM,EP,ER,ES,ET,TR)
I would like to drill down to another form (frm_fund_Groups) field Fund Type Code and display only the records based on the multiple values from the Fund_Map field on the frm_Accountinng_Transactions. Thanks
0
Comment
Question by:shieldsco
  • 4
  • 2
  • 2
8 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
try

docmd.openform "frm_fund_Groups",,, "[Fund Type Code]='" & me.txtFund_Map & "'"
or

docmd.openform "frm_fund_Groups",,, "[Fund Type Code]=" & chr(34) & me.txtFund_Map &  Chr(34)
0
 

Author Comment

by:shieldsco
Comment Utility
I get compile error Method or Data Member no found on both..........txtFund_Map
0
 

Author Comment

by:shieldsco
Comment Utility
Please note - the number of pairs vary with the records... some records my have three pairs while other records my none (null) or 1 or 5 etc
0
 

Author Comment

by:shieldsco
Comment Utility
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
Comment Utility
use these codes


Private Sub Fund_Map_Click()
Dim strFund As String, j As Integer, fundArr() As String
If InStr(Me.Fund_Map, ",") Then
    fundArr = Split(Me.Fund_Map, ",")
    For j = 0 To UBound(fundArr)
        strFund = strFund & "," & Chr(39) & fundArr(j) & Chr(39)
    Next
    Else
    strFund = Chr(39) & Me.Fund_Map & Chr(39)
End If
If InStr(strFund, ",") Then
    strFund = Mid(strFund, 2)
End If

DoCmd.OpenForm "frm_fund_Groups", , , "[Fund Type Code] in(" & strFund & ")"
End Sub

Open in new window

0
 
LVL 29

Expert Comment

by:IrogSinta
Comment Utility
You can also give this a try:
DoCmd.OpenForm "frm_fund_Groups", , , "InStr('" & Me.Fund_Map & "',[Fund Type Code])>0"

Open in new window

Ron
0
 

Author Closing Comment

by:shieldsco
Comment Utility
Very Good-- Thanks
0
 
LVL 29

Expert Comment

by:IrogSinta
Comment Utility
So did you the other solution not work?
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now