Passing query result to a form

josephbupe

Registered User.
Local time
Today, 23:37
Joined
Jan 31, 2008
Messages
247
I have a situation where a victim claims can identify a suspect's face. So basing on age range and other personal attributes distribed by the victim a query is run and matching records are displayed in a form with small image previews. I want the results of this query as displayed to pass to another form where I can navigate through the images for suspect identification.

I have done the form design as in attached screeshort.

How can I accomplish this?

Joseph
 

Attachments

  • ScreenShort.jpg
    ScreenShort.jpg
    84.1 KB · Views: 107
Get the same filtered record source, set it as the record source of your pop-up form and only include the field that holds the source of the image in there.
 
Get the same filtered record source, set it as the record source of your pop-up form and only include the field that holds the source of the image in there.

Hi,

Sorry, I delayed to come back. However, after several attempts with this I cannot get the query passed to the pop up form. What am i missing? My code is as follows:

Code:
Dim strForm, varWhere As String
    
    strForm = "frmSlideShow"
    
    'cmdSlideShow_Click

    varWhere = Forms!frmPersonsSub.Form.RecordSource

    ' strip off beginning of SQL if there is a filter
    If Left(varWhere, 36) = "SELECT * FROM qryPersons WHERE " Then
        varWhere = Right(varWhere, Len(varWhere) - 36)
    Else
        varWhere = ""
    End If

    ' DoCmd.OpenForm strForm, acViewNormal, , varWhere, acDialog
    DoCmd.OpenForm strForm, acViewNormal, , varWhere
 

Attachments

You have already built up the record source of the original form when you click the Search button. Simply use that as the record source of this form you're trying to build.

What is the difference between the first popup form and the "navigate" form? Not much except that one has a bigger picture, is a singe form and has less fields. Record Source is the same.
 

Users who are viewing this thread

Back
Top Bottom