Continuous ferking forms!?!?!?!

jax

Registered User.
Local time
Today, 21:36
Joined
Mar 4, 2002
Messages
61
Am I loosing my mind?!?

I have a form containing a subform, this subform is displayed as a continuous form.

Ooooh simple so far...

Now, when I change a date on the subform, it automatically ticks a box. This change is not displayed immediately unless I click on the relevant record on the continuous form!

I've tried Me.refresh and Me.requery in several places, to no avail.

Yup I fink I am going mad 8-( heeeellppppp...
 
Below is the code used to tick or not tick a check box dependent on two dates - it seems to work the oncurrent event of the subform. It doesnt update unless you click on the relevant record in the continuous list. The information for this continuous list is gained from another subform which is opened, completed and then information shown as a subform on the main form.

Private Sub Form_Current()
If Me.Post_End_Date < Date Or Me.Resignation_Date < Date Then
Me.Check49 = False
Else
Me.Check49 = True
End If
Me.Refresh
End Sub

I want it to tick or not tick the box automatically. I hope this is clear thanks.

Jax
 
Is the Post_End_Date and Resignation_Date part of each individual record or are they separate fields?
In order to process the on_current event, a record must be selected (only one record at a time) and it will process the code for that record only.
If you want to batch update records you will have to be a little more creative.

ps Are you using your calendar to pick the dates or are you typing them in? - this will determine your coding.

HTH
 
Fizzio
Each record has the two separate date fields. The dates are chosen from a calender. What do you mean by "If you want to batch update records you will have to be a little more creative" Any hints Fizzio!!?!?!?!
 
Did you try any of the alternatives given to you on your previous post? Please also continue with the same thread so people responding aren't wasting their time.
 
Thanks Rich for your comment, but I am not trying to waste anyones time, least of all my own. I have tried EVERYTHING that has been suggested in any replies and I thank everyone for their time.

I got the checkbox formula to work but only in OnCurrent on the subform. But it doesnt automatically tick or not tick the checkbox as required. I understand what Fizzio is saying about OnCurrent only refreshs the current record - I need a way round this but dont know how.
I am grateful for any assistance.

Jax
 
Thanks rich, I tried that but it didnt seem to make a difference. The checkbox is only ticked or not ticked if I select the record in the continuous form.
 
What I meant by batch updating is changing a lot of records at the same time via code or via an update query. You could use update queries to do this or coding via a recordset situation but I would be tempted to use a recordset and update a few records at a time.
I'll work on it and try to post back.

Actually I think Rich is on the right lines. When you pick the dates, after clicking the date and closing the calendar, which control has the focus. I seem to remember you using a command button to show and hide the calendar. Maybe you just need to set the focus to the current record after updating the date for it to work. Just a thought

[This message has been edited by Fizzio (edited 03-20-2002).]
 

Users who are viewing this thread

Back
Top Bottom