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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Complicated Question

Status
Not open for further replies.

Ajwebb

MIS
Jul 31, 2003
153
0
0
GB
I have a form and on my form is a list box with 5 fields.

Within those five fields are two primary keys and what i would like to be able to do (not sure if this is possible) is when i click on a record in the list box and highlight it, click a command button and open the record relating to that selection i have made on the list box.

I'm not sure how i would create the linking criteria or anything.

My list box is called list42 and the two primary keys are called [Learn_id] and [Provi_id].

If i try and create a command button and then select find specific data to display it gives me all of the fields and then list42 is at the bottom, so i am not able to select the fields within the list as the linking criteria.

Not sure if this is possible or even makes any sense.

Thanks Everyone.


Anthony
 
make the listbox unbound, and set its rowsource to the field you wish to use for criteria

set the recordsource of the form to a query using the value of the list as critera. do this from code that is activated after a value is selected on the list, or that selects a value (such as the first entry) on startup before setting the recordsource to avoid errors caused by missing parameter values.

this should filter your records down to those relevant to what you've selected on the list.




- ....we decided it'd be a friendly gesture for us to take the garbage down to the city dump. So we took the half a ton of garbage, put it in the back of a red VW microbus, took shovels and rakes and implements of destruction and headed on toward the city dump.

Well we got there and there was a big sign and a chain across across the dump saying, "Closed on Thanksgiving." And we had never heard of a dump closed on Thanksgiving before, and with tears in our eyes we drove off into the sunset looking for another place to put the garbage.

We didn't find one. Until we came to a side road, and off the side of the side road there was another fifteen foot cliff and at the bottom of the cliff there was another pile of garbage. And we decided that one big pile is better than two little piles, and rather than bring that one up we decided to throw our's down....

- Arlo Guthrie, on garbage collection (and the draft, though the song's about Alice)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top