subform textboxs wont refresh requery

G

Guest

Hello again :)


In Brief...

The textboxes on my subform do not refresh when i use the navigator buttons
to change records on the mainform. :) and i have put me.subformname.requery
in several places :-(




In Detail.....

I have [Volunteers] and [Notes] tables linked thru the [volunteers]
primarykey (pkVolunteerID) to the [notes] foreignkey (fkVolunteerID) so that
every record in [volunteers] can have several related records in the [notes].
fyi, [Notes] has a primarykeyfield (pkNotesID) and a DATE field.

On the form which displays the records from the [VOlunteers] table, i
created a list box("listNotes") that lists dates for all related records from
the [Notes] table ...Using a query placed in the listbox's row source and
also placed in the forms on_current event, for good measure. fyi: the
listboxs bound column is pkNotesID.

Then next to the listbox, i placed a subform whose LinkChildField:
[pkNotesID] and LinkMasterField: [ListNotes]. On the subforms form is a
textbox whoses control source is the "note" field from the [notes] tables.

.....and VOILA! When i click on a date in the listbox, the related note loads
in the subform. HOWEVER, if i then click on the record navigtor to change the
main forms record, whatever note was in the subform forms textbox STAYS! So,
if the next volunteer record has NO NOTES listed in the listbox, the last
note loaded stays visible in the subform. And if the next record on the main
form does have at least one note, the subform still wont refresh unless i
click on one of the new records notes.

Everytime i change records, id prefer to have the subform clear its data.
and then, if the next record had several related notes,id maybe want it to
select the last(lastest) row in the listbox.


i put a me.listbox.select(0) and tried a me.listbox.select(1) in the main
forms oncurrent even, but that does nada :( to the subform data. (I spent two
days trying different combinations of codes placed in a veriaty of events) I
also read a heap of posts related to subform requeries and refreshing. but..
to no avail. Do you have any suggestions?

Cheers,
WebDude.
 
G

Guest

webdude,
Instead of me.listbox.select. try to use me.listbox.value = whatever u
display on ur listbox.
 
G

Guest

Jeff!

It worked like a charm.
Im gonna add you to my xmas list :)

Cheers!
Jeff
aka: WebDude
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top