UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Need Help with MVF, Access 2016    
 
   
aerts2js
post Nov 27 2017, 05:37 PM
Post#1



Posts: 1
Joined: 27-November 17



If anyone could help me out on this it would be very much appreciated. I've spent all day on this MVF field and I'm at an end. All I want is for it to display all of the values in the current record set. Unfortunately, when trying to run a code I get an error "Item not found in collection" at "Set rstDetails = Me.Issue_Type.Value "

I know the name of the field is correct... I don't understand what I can be doing wrong. frown.gif Please help! (and i get it MVF fields suck but I need to find a way to get this to work)

Best,
Jeremy

My Code:


Dim rst As DAO.Recordset
Dim rstDetails As DAO.Recordset
Set rst = Me.Recordset 'Set the first recordset to the table
With rst
While rst.EOF = False 'Loop through each record in the table
Debug.Print
Debug.Print rst!ID 'Print field ID of current record in table
Set rstDetails = Me.Issue_Type.Value 'Set the second recordset to the current record's MVF
While rstDetails.EOF = False 'Loop through all values in the MVF
Debug.Print " " & rstDetails.Fields(0).Value 'Print each value of the MVF
rstDetails.MoveNext 'Moves to next item in the MVF
Wend
rst.MoveNext 'Moves to next record in the table
Wend
End With

exit_proc:
On Error Resume Next
Set rstDetails = Nothing
rst.Close
Set rst = Nothing
Exit Sub

err_proc:
MsgBox Err.Description
Resume exit_proc
End Sub
Go to the top of the page
 
theDBguy
post Nov 27 2017, 10:10 PM
Post#2


Access Wiki and Forums Moderator
Posts: 71,230
Joined: 19-June 07
From: SunnySandyEggo


Hi Jeremy,

Welcome to UtterAccess!
welcome2UA.gif

I couldn't see anything obviously wrong with your code. Can you post a sample copy of your db or some screenshots to help us understand better what is happening?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    16th December 2017 - 11:47 AM