1

Topic: To lose for the open form event Form_Current once again without passage to other record.

Friends, kind time of days! Such question: there is an open single form which is stupidly anchored to the table and, accordingly, displays one of records of this table. From this form the button had been caused the second form (in any way not connected with the first) with which help various manipulations had been made changes to the record displayed by the form No1. At closing of the form No2 these changes appeared on the form No1 (it was not necessary to do Refresh, something in this genre). But here the trouble, from a field in which value changed, depends the button which should be activated in the event that new value is distinct from zero.
At passage on records on event Form_Current procedure which looks, what value No1 is made appears at display of the next record. If it is more 0 the Button is activated, less - it is locked. Also it is made on After_Update a field No1. But how much I understood, change "not hands" values is not events neither After_Update nor Before_Update... sad sad
I tried to do at closing of the second form so:

If CurrentProject. AllForms ("MainListForm").IsLoaded = True Then Forms! [MainListForm].Form. Rrefresh

Responses - 0 sad
The same with Recalc, Repaint... And Requery - not to suit, as drops the form to the first record...
Than to force to be lost once more event Form_Current on this unfortunate form? It that would unblock precisely this  the button... And the form would remain on current record, without any jumps...
In advance thanks.

2

Re: To lose for the open form event Form_Current once again without passage to other record.

Make procedure Form_Current public ( Public Sub Form_Current () ) in the form of MainListForm

If CurrentProject. AllForms ("MainListForm").IsLoaded Then Forms! [MainListForm].Form_Current

3

Re: To lose for the open form event Form_Current once again without passage to other record.

mds_world, I welcome, ! It's ages since we met! wink Thanks for the response! Tomorrow I will try... wink
P.S. It is glad .;)

4

Re: To lose for the open form event Form_Current once again without passage to other record.

Wipeout2097, the form No2 can be opened in a mode acDialog, and following actions after OpenForm - Refresh and Call Form_Current.

5

Re: To lose for the open form event Form_Current once again without passage to other record.

Anatoly (Kiev), yes, by the way, forgot to tell, and the second form and so it is really opened in a mode acDialog... But I so understand, procedure Form_Current on the first form needs to be made all the same public how advised MDS WOLRD?

6

Re: To lose for the open form event Form_Current once again without passage to other record.

Everything, children, thanks, a variant mds world worked! All thanks!

7

Re: To lose for the open form event Form_Current once again without passage to other record.

Greetings Wipeout2097! Again for old undertook:-D

8

Re: To lose for the open form event Form_Current once again without passage to other record.

mds_world, yes, does not release me!:D
Fairly, changed an activity profile, thought I will not sit down any more for Access... sad And skills that lost... But is not present, in a new field too it is possible to simplify tasks... Well I do not like to work, lazy I... And laziness, as it is known - the progress engine... It is necessary to "overcome" only colleagues who name till now computer "Shaitan-car"...:D

9

Re: To lose for the open form event Form_Current once again without passage to other record.

By the way, and if to make Me. Requery event Form_Current should after all be caused?

10

Re: To lose for the open form event Form_Current once again without passage to other record.

Joss;
All is true, but to me this variant did not suit, as the form at Me. Requery drops on the first record. And I needed to save display of current record.  then with Me. RecordsetClone and Bookmark it would not be desirable... Therefore a variant mds world most .;)