Help with subform/datasheet

flushfire

New member
Local time
Today, 04:53
Joined
Jan 1, 2008
Messages
9
I have a form with a field load number. I have a subform in datasheet view called orders, and another subform based on a query where it displays the orders tagged with the load number in my main form. What I want to be able to do is for the user to be able to select orders from my first subform (without having to use checkboxes) and then press a button to have the form tag those orders with the load number, and then have that button requery the second subform to display the tagged orders.

What I don't know how to do is how to tell access that the user's selected/highlighted orders are the ones it should tag. I don't know what to put in the WHERE clause of the update query. Help please. :D
 
eh? that was the question in the first place, how do i add the load number? I don't know how to refer to the selected records without having the user check some boxes or type in filters. What i want is for them to click/select the records in datasheet view and then press a button and then that button tags the records with the load number.

how would the query/code look like? is there something that looks like subform.recordset.selected?

any sample on the listbox method? Thanks, btw.
 
A more complex method:
Use a multi-select listbox rather than a subform. When the user clicks the button, run a code loop that updates each selected record with the load number.

This turned out to be the best solution. I did not know that when using datasheets there can be only one current record. Anyway, thank you for this tip. :D
 

Users who are viewing this thread

Back
Top Bottom