Refresh combo box?

  • Thread starter Thread starter Chips
  • Start date Start date
C

Chips

Using Access 2K

I have a main form (based on TblJob) containing a subform.

The subform (FrmSbSubCbyJob) has a combo box that chooses records from a
TblSubCont.

It fills in records in TblSubContbyJob

I have a command button that opens up a FrmSubcont for TblSubCont so that I
can add or edit records in it.

When I close the FrmSubCont I want it to refresh or requery the combo box in
FrmSbSubContbyJob so that it now displays the newly added, deleted, or
edited records correctly.

I have not been able to figure out how to do this. Any help would be
appreciated.

GC
 
just go forms!FrmSbSubContbyJob! [your list box name here].requery

(if you need to requery a form, do the same thing...
forms!FrmSbSubContbyJob.requery)

-kevin
 
Would I put this in a "On Close" event for the FrmSubCont?

GC


Kevin S. said:
just go forms!FrmSbSubContbyJob! [your list box name here].requery

(if you need to requery a form, do the same thing...
forms!FrmSbSubContbyJob.requery)

-kevin


Chips said:
Using Access 2K

I have a main form (based on TblJob) containing a subform.

The subform (FrmSbSubCbyJob) has a combo box that chooses records from a
TblSubCont.

It fills in records in TblSubContbyJob

I have a command button that opens up a FrmSubcont for TblSubCont so
that
I
can add or edit records in it.

When I close the FrmSubCont I want it to refresh or requery the combo
box
in
FrmSbSubContbyJob so that it now displays the newly added, deleted, or
edited records correctly.

I have not been able to figure out how to do this. Any help would be
appreciated.

GC
 
I believe so.


Chips said:
Would I put this in a "On Close" event for the FrmSubCont?

GC


Kevin S. said:
just go forms!FrmSbSubContbyJob! [your list box name here].requery

(if you need to requery a form, do the same thing...
forms!FrmSbSubContbyJob.requery)

-kevin


Chips said:
Using Access 2K

I have a main form (based on TblJob) containing a subform.

The subform (FrmSbSubCbyJob) has a combo box that chooses records from a
TblSubCont.

It fills in records in TblSubContbyJob

I have a command button that opens up a FrmSubcont for TblSubCont so
that
I
can add or edit records in it.

When I close the FrmSubCont I want it to refresh or requery the combo
box
in
FrmSbSubContbyJob so that it now displays the newly added, deleted, or
edited records correctly.

I have not been able to figure out how to do this. Any help would be
appreciated.

GC
 
When I put this in code for the FrmSubCont I get an error that it can't find
FrmSbSubCbyJob.

Private Sub Form_Close()

Forms!FrmSbSubCbyJob.Requery

End Sub

When I put this in code for FrmSbSubCbyJob, like on got focus or activate,
it doesn't update the combo box.

I tried this as well with Forms!FrmSbSubCbyJob!SubContractor.Requery

Thanks,

GC


Kevin S. said:
I believe so.


Chips said:
Would I put this in a "On Close" event for the FrmSubCont?

GC


Kevin S. said:
just go forms!FrmSbSubContbyJob! [your list box name here].requery

(if you need to requery a form, do the same thing...
forms!FrmSbSubContbyJob.requery)

-kevin


Using Access 2K

I have a main form (based on TblJob) containing a subform.

The subform (FrmSbSubCbyJob) has a combo box that chooses records
from
a combo
box
 
Back
Top