update parent/childform

  • Thread starter Thread starter Vsn
  • Start date Start date
V

Vsn

Hello all,

I can't solf the following problem:

I have a parrent form with an unbound listbox on it. A child form with data
fields. Now if I navigate in the listbox with mouse or keyboard the child
form follows nicely no problem. But now I use code to move like
listbox.slected(listbox.index-1)=true, unfortunatly now the child form does
not follow. I have tried all requiry, recals, refresh nothing seems to work.
I have been trying all for hours without result.

Could any one give me a clue?

Many thanks.
 
Hello all,

I can't solf the following problem:

I have a parrent form with an unbound listbox on it. A child form with data
fields. Now if I navigate in the listbox with mouse or keyboard the child
form follows nicely no problem. But now I use code to move like
listbox.slected(listbox.index-1)=true, unfortunatly now the child form does
not follow. I have tried all requiry, recals, refresh nothing seems to work.
I have been trying all for hours without result.

Could any one give me a clue?

Please post the relevant properties of the Subform (Recordsource, and
Master/Child Link Fields); and any code connected with the Listbox
which was originally working.
 
Hello John,

Thanks for your innitial reaction, here are the details:-

Manualy it still works, it just that all does not updat when I shift the
seleded item with code. The idear to shift it manualy is the the user by
pressing the remove button the current date adds to the field fRemoveDate.
No is this field Is Not Null the record should not be shown. So I remove it
from the unbound listlist box by requery this one and than I select the item
above the removed one if the listbox index was no 0 (first in list). If i
move (by code) the selected item I do expect the child field to update as
well, but it doen not.

Both forms parrent and child share the same table and are bound with the
field fName

The record resorse on the parrent form:
SELECT tblUnits.fName
FROM tblUnits
WITH OWNERACCESS OPTION;

The row sourse query of the unbound listbox on the parrent form:
SELECT tblUnits.fGroupe, tblUnits.fName, tblUnits.fRemoveDate
FROM tblUnits
WHERE (((tblUnits.fRemoveDate) Is Null))
ORDER BY tblUnits.fGroupe, tblUnits.fName
WITH OWNERACCESS OPTION;

The record resorse on the child form
SELECT tblUnits.fName, tblUnits.fRegNumber, tblUnits.fType,
tblUnits.fGroupe, tblUnits.fDescription, tblUnits.fRemarks,
tblUnits.fEditDate, tblUnits.fRemoveDate
FROM tblUnits
WITH OWNERACCESS OPTION;


This is the information you need to help me solve the problem / brainwave.
If not I could send you the Access file with the troublesome forms in it (I
don't know if thats allowed in a news group).

Thx very much.
Ludovic
 
Back
Top