Solved

Access 2010 Form with multiple values in a field

Posted on 2014-09-23
6
258 Views
Last Modified: 2014-09-24
I have an Access form with multiple values in a field separated by a space in the following format:
Field(Proprietary_Debit) .....Sample Data (Text)
21100009 88010001
21100009 88010001 57000001
10100001

I would like to drill down to and another form and display the data that matches. The code below works for non-multivalued fields:
DoCmd.OpenForm "frm_Object_Classes", , , "[USSGL]='" & Me.Proprietary_Credit & "'"
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
  • 3
  • 3
6 Comments
 
LVL 50

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 40341080
You can open with a list of values:

strList = "('" & Replace(Me.Proprietary_Credit, " ", "','") & "')"
' Example: "('21100009','88010001')"
DoCmd.OpenForm "frm_Object_Classes", , , "[USSGL] In " & strList

/gustav
0
 

Author Comment

by:shieldsco
ID: 40341176
I have thousands of rows so that would be impractical
0
 

Author Comment

by:shieldsco
ID: 40341186
Row 1 21100009 88010001
Row 2 21100009 88010001 57000001
Row 3 10100001
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!

 
LVL 50

Expert Comment

by:Gustav Brock
ID: 40341188
You wrote you would open a form. Click a button running the code and that will do it.

/gustav
0
 

Author Closing Comment

by:shieldsco
ID: 40341358
Very Good
0
 
LVL 50

Expert Comment

by:Gustav Brock
ID: 40341364
Thanks!

/gustav
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…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

733 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