My Assistant
|
|
Oct 18 2010, 04:14 PM
Post
#1
|
|
|
UtterAccess Guru Posts: 655 From: South Dakota |
Is there a way to have a listbox linked to another table. Without using a subform.
Here is the situation. I have a detail form based on (tblUnit) on which I have a tab control. One of the pages of the tab control will contain Note information. I have listbox control on this page which needs to have a record source pointed at my tblUnitNotes table. The list box current recordsource is this: SELECT tblUnitNote.UnitNoteID, tblUnitNote.UnitID, tblUnitNote.NoteDate AS [Note Date], tblUnitNote.Note, tblUnitNote.NoteCategory AS Category FROM tblUnitNote INNER JOIN tblUnit ON tblUnitNote.UnitID = tblUnit.UnitID; I thought this would do it but when I change records on my Detail form the Notes list box stays on the same record in the tblUnitNotes. The linking field between the two is UnitID. Any ideas? |
|
|
|
![]() |
Oct 18 2010, 05:15 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 5,115 From: Dunbar, WV |
Add
WHERE tblUnitNotes.UnitID = Forms.formname.UnitID to the query. Then put Me.listboxname.Requery in the form's on current event. Robert |
|
|
|
Oct 18 2010, 05:21 PM
Post
#3
|
|
|
UtterAccess Guru Posts: 655 From: South Dakota |
That works! Thanks.
|
|
|
|
Oct 18 2010, 05:39 PM
Post
#4
|
|
|
UtterAccess VIP Posts: 5,115 From: Dunbar, WV |
You're welcome.
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 24th May 2013 - 04:39 AM |