Solved

Access 2010 Drill Down to Another Form

Posted on 2014-09-14
8
246 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:shieldsco
ID: 40321902
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

740 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