Getting combo and subform data current on record

  • Thread starter Thread starter Rose B
  • Start date Start date
R

Rose B

I have two questions:-

1. I have a combo field where the underlying query has a criteria on a date
forled of "[Forms]![frmGroupTrips].[GroupTripDate]". If I use the field on
the form, the list is not there. If I go into the query via properties and rn
it, it retruns the single record I need. When I go back to the form then the
record is there in the combo list - but if I go o another record, with
another date then it is still there and shouldn't be. Why does the query
behind the combo box update based upon the current data? (Or more precisely -
how can I get it to do that?)

2. I have 2 subforms within the main form and I would like to get the
subforms to be updated when a button is clicked - how can I do that?

Thanks,
 
1. Post the SQL of the query, please.

2. Use the requery method. Assuming your button is on the main form:

Me.SubformControl1.Form.Requery
Me.SubformControl2.Form.Requert

Note that SubformControln is the name of the subform control on the main
form, not the name of the form being used as the subform.
 
The SQL is

SELECT Event.EventID, Event.EventTitle, Event.EventDate
FROM Event
WHERE (((Event.EventDate)=[Forms]![frmGroupTrips].[GroupTripDate]));

Klatuu said:
1. Post the SQL of the query, please.

2. Use the requery method. Assuming your button is on the main form:

Me.SubformControl1.Form.Requery
Me.SubformControl2.Form.Requert

Note that SubformControln is the name of the subform control on the main
form, not the name of the form being used as the subform.
--
Dave Hargis, Microsoft Access MVP


Rose B said:
I have two questions:-

1. I have a combo field where the underlying query has a criteria on a date
forled of "[Forms]![frmGroupTrips].[GroupTripDate]". If I use the field on
the form, the list is not there. If I go into the query via properties and rn
it, it retruns the single record I need. When I go back to the form then the
record is there in the combo list - but if I go o another record, with
another date then it is still there and shouldn't be. Why does the query
behind the combo box update based upon the current data? (Or more precisely -
how can I get it to do that?)

2. I have 2 subforms within the main form and I would like to get the
subforms to be updated when a button is clicked - how can I do that?

Thanks,
 
Back
Top