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

Using Listbox to display child table entries 2

Status
Not open for further replies.
Jul 24, 2000
88
CA
I have a parent-child pair of tables and, when moving through the parent records, wish to display a listbox of the related children. I have children in the table but they do not display! Any ideas?

Some ListBox properties are as follows:
Name: txtProject_Announce_ID
Control Source: <blank>
Row Source Type: Table/Query
Row Source: SELECT qryProjectAnnouncements.Project_Announce_ID_long, ...etc... FROM qryProjectAnnouncements
WHERE (((qryProjectAnnouncements.Project_ID_long)="plongProject_ID"));

I am setting the global plongProject_ID each time movement is made through the record source by triggering Form_Current.

Richard

 
are you including a requery command?

txtProject_Announce_ID.Requery


PaulF
 
When you set plongProject_ID, add this code:
Me!txtProject_Announce_ID.RowSource = _
"SELECT Project_Announce_ID_long, ...etc..." _
& " FROM qryProjectAnnouncements WHERE Project_ID_long=" & plongProject_ID
Me!txtProject_Announce_ID.ReQuery

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks Paul. I have just added a requery as you suggest but still nothing is displayed...

RjB
 
PH should have hit on it with the variable

WHERE Project_ID_long=" & plongProject_ID

as well as the requery
PaulF

 
Thanks to both PaulF & PH - your help was invaluable. I now get the listbox changing as I cycle through the records.

I've run into another problem, but I'll make a new thread so please look out for it!

Thanks again,
Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top