PC Review


Reply
Thread Tools Rate Thread

Assistance with Output

 
 
JMay
Guest
Posts: n/a
 
      7th Jun 2010
I fould the below code demonstaring how to output multivalue fields;

Sub BrowseMultiValueField()
Dim db As Database
Dim rs As Recordset
Dim childRS As Recordset
Set db = CurrentDb()
' Open a Recordset for the Task Table
Set rs = db.OpenRecordset("Tasks")
rs.MoveFirst
Do Until rs.EOF
'Print the name of the task to the immediate window
Debug.Print rs!TaskName.Value
'Open a Recordset for the multivalue field
Set childRS = rs!AssignedTo.Value
'Exit the loop if the multivalue field contains no records
Do Until childRS.EOF
childRS.MoveFirst
'Loop through the records in the child recordset
Do Until childRS.EOF
'Print the owner(s) of the Task to the immediate window
Debug.Print Chr(0), childRS!Value.Value
childRS.MoveNext
Loop
Loop
rs.MoveNext
Loop
End Sub

The output of this code is as follows:

Issue1
5
6
Issue2
6
7
Issue3
5
6
7

The numerics are the ID (bound column) field. Can I get the next field over
from the ID (sort of an OFFSET) 5 = Jim; 6 = Bill; 7 = Dick?

Relatively new to access here!!!


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime error 2501 Output to / output Query / excel ODR via AccessMonster.com Microsoft Access VBA Modules 8 3rd Mar 2008 04:54 PM
Bound Span control, limited output to data page, output truncated E W A L S H Microsoft Access 0 1st Apr 2007 06:12 AM
Output to - Adding a date to the Output File Argument =?Utf-8?B?VGltYm9i?= Microsoft Access Macros 2 22nd Oct 2004 04:36 PM
Please help! My ATI 9700 Pro will only push output #2! output 1, nada! (software glitch) Patrick Vick ATI Video Cards 1 9th May 2004 09:34 AM
ancient laser printer with output - lbp4 output.jpg (0/1) Judy Cosler Printers 1 19th Aug 2003 11:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:07 PM.