Calendar change needs to requery subform

G

Guest

Hi groupies.

I have a subform tied to a query. The date of the query uses the date on the
calendar of my main form as criteria.......my thought being that when the
date on the calendar changes then the date of the query changes as well.

I added a requery statement to the On Updated event of the calendar, but the
subform will not change until I hit enter and then it also moves to the first
record in the sub, I would like it to stay on the current record.

My code for the calendar event is simply:

Private Sub CalCtl1_Updated(Code As Integer)
Me!fsubDailyBoxes.Requery
End Sub

Any ideas??
 
G

Guest

the subform is going to the first record because there is no criteria telling
it to do otherwise....

whatever criteria told the sub to be at record X needs to be held somewhere
and available as criteria for when the sub or query reopens..
 

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

Similar Threads


Top