Access query property from form?

autocol

Hopelessly Confused
Local time
Today, 21:13
Joined
Jun 7, 2005
Messages
5
I have a form that is to be used to browse through parts using various filters (like category, snippets of part number or description) to find particular components, and then draw information from those components onto the form to be used for other things.

Queries I seem to understand - I've made a query which I've embedded on the form which happily filters the parts using the combo-boxes and text boxes on the form.

What I can't figure out is how to access the information IN the query! There doesn't seem to be a "double-click" event, or a "highlighted row" property, that I can use to tell the query WHICH of the parts returned after filtering is the particular one Im interested in, to draw information from the row.

What I want is a command button that, once the desired part is selected, "sucks" the data out of the query into text boxes on the form.

I've tried something like -

Code:
Private Sub cmdSelect_Click()

    Me.txtSelectedPartID = Me.qryPartFinder.PartID

End Sub

...but it tells me that the method or data member is not found. When I'm typing the code the auto-complete thingy happily finds "qryPartFinder" when I type "me", but none of the available properties in the list for qryPartFinder seem to be what I need.

How DO you access the data in a highlighted (and/or somehow selected) row?

TIA.

Col.
 
autocol said:
I've made a query which I've embedded on the form

Sorry, I don't quite follow you, do you mean that this query is the record source of your form?

Or do you mean that you have a subform on a form showing the data in a datasheet?

Or do you mean that the information appears on the form in a combo box?

Or is there something else that it could be that I have missed?
 
Sorry, I'm not quite sure what the terminology is.

I "drag and dropped" the query onto the form. When I got to the properties of the query on the form the window says "Subform/Subreport : qryPartFinder"

So I guess it's a subform...?
 

Users who are viewing this thread

Back
Top Bottom