Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with passing the currently selected record to a query

Status
Not open for further replies.

kgreen

Technical User
Sep 11, 2000
32
GB
I have a form [frmMain] that displays a subform [subfrmData]
which in turn displays a set of records based on a query.

I have been trying to work out a way of Access selecting which ever record I decide to highlite using the record selectors and then Running ONE of a further set of two other querys (each is assigned to the on click event of a button) depending on which button I press.

I have designed the two querys [qry1] & [qry2] that are assigned to the button OK, but I can not get Access to pass ONLY the query I select with the record selectors to which ever query I want to pass it to.

Can anyone suggest a way of doing this?????? I have spent all weekend but have not even come close and the experts of this forum have kindly helped me out in the oast.

My grateful thanks in advance

Kenny green. [sig][/sig]
 
Kenny,

Include a boolean (Yes/No) field in the table/Query. Have the user 'Check' the record. do another query with the addition of the boolean field to locate/retrieve the individual record. If this is a heavily used database/recordset, you will need to have the original "query" [qry1]? be based on a temp table (it could be a make table query), to prevent concurrent users from getting too many / wrong records. Also, if this is the case, you will need to consider the use of the record info in [qry2], and wheather it needs to be based on the sub-set from [qry1] or the original recordset. Not the most elegant soloution, but at least something to get started with.

[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
Hi Michel,

I will give your suggestions a try but i am not sure if my VB-A knowledge is up to it.

Thanks for the suggestion.

Kenny [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top