Solved

Access 2010 Drill Down to Another Form

Posted on 2014-09-14
8
244 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
ID: 40321793
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
ID: 40321825
I get compile error Method or Data Member no found on both..........txtFund_Map
0
 

Author Comment

by:shieldsco
ID: 40321827
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
ID: 40321902
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 40321923
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
ID: 40321927
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
ID: 40321933
Very Good-- Thanks
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 40322053
So did you the other solution not work?
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
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 different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

919 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

19 Experts available now in Live!

Get 1:1 Help Now