Cancel Update (1 Viewer)

SunWuKung

Registered User.
Local time
Today, 04:26
Joined
Jun 21, 2001
Messages
172
I have two unbound subforms on a main one. One of these is displaying records calculated with the data entered on the other. It is updated with a button. The calculation is quite lenghty so I would like to avoid it when the forms first open, since there would not be any data in anyway. Naturaly though it wants to display the data when it is first opened.
Could somebody tell me what is the correct sintax to avoid that?

Many thanks.
SWK
 

pcs

Registered User.
Local time
Yesterday, 22:26
Joined
May 19, 2001
Messages
398
can you set the 2nd subform's visible property to No...then when the update button is pressed set the visible to Yes

not quite sure what you mean by:
The calculation is quite lenghty...

but you could also do the calculation only after the update button code...

hth,
al
 

SunWuKung

Registered User.
Local time
Today, 04:26
Joined
Jun 21, 2001
Messages
172
When the forms are initially loaded you have to wait a lot for a calculation that is at this point unnecessary since there is no data yet to start with. The logical solution would be to load the 2nd form separately when the button is pressed but they look so nice next to each other (the input and the output) that I would rather keep it that way.
I am not sure that just setting the forms property to not visible would prevent the calculation of its data in the background but I will try.
Thanks.
 

pcs

Registered User.
Local time
Yesterday, 22:26
Joined
May 19, 2001
Messages
398
...but they look so nice next to each other...

you could place a box on top of your subform (same size and background) which will disappear when you set the subform to visible. or, for that matter, an empty subform and toggle the visible property.

not quite sure abt. the calculation part. if the calculation occurs in code, couldn't you just move it so it didn't execute until a selection had been made?

hth,
al
 

Users who are viewing this thread

Top Bottom