Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access 2010 Form with multiple values in a field

Posted on 2014-09-23
6
Medium Priority
?
261 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
  • 3
  • 3
6 Comments
 
LVL 52

Accepted Solution

by:
Gustav Brock earned 2000 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
Independent Software Vendors: 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 52

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 52

Expert Comment

by:Gustav Brock
ID: 40341364
Thanks!

/gustav
0

Featured Post

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!

Question has a verified solution.

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

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 …
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

824 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