1

Topic: Subject of opening of forms, depending on "Code" and lines

Kind time of days!
The problem sounds so!
There is a form, at pushing the button, in this form, other form opens...
But the problem that it opens empty, such sensation that it does not take the data from request as though all of them are filtered, tried to cut down all the filter, did not help, tried to make a macro on discovery, did not help.
Help, people clever!

2

Re: Subject of opening of forms, depending on "Code" and lines

Wawan2005;
Read HELP or the Internet about method DoCmd. OpenForm

3

Re: Subject of opening of forms, depending on "Code" and lines

sdku;
I read and searched, here that turned out
Button click
[code]
Private Sub Kartochka_Opreat_Click ()
On Error GoTo Err___Click
DoCmd. DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, acMenuVer70
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "001 Card "
DoCmd. OpenForm stDocName, stLinkCriteria
Exit___Click:
Exit Sub
Err___Click:
MsgBox Err. Description
Resume Exit___Click
End Sub
[/code]
In request
[code]
[Forms]! [Data]! [code]
[/code]

4

Re: Subject of opening of forms, depending on "Code" and lines

Wawan2005,

5

Re: Subject of opening of forms, depending on "Code" and lines

Wawan2005;
Generally the fourth parameter of discovery of the form should have the same appearance, as well as in expression where, i.e. type

stDocName = "[doc_name_column] = ' 001 Card  '"

And still check up, whether property of form Data Entry (I do not know precisely as in the Russian version) is included. At   the form will always open on new record, old will not show.

6

Re: Subject of opening of forms, depending on "Code" and lines

I not absolutely understood, but at me here so, in the attached file, all not tables and unnecessary forms are hidden. (That is it is possible to display)
To launch the form "Data"
In it "Operative cards" the button
The card form opens, but it empty, does not fill the data from request "__2"
Under the relation in the selected line in the field where the list of proprietors.

7

Re: Subject of opening of forms, depending on "Code" and lines

Wawan2005,

8

Re: Subject of opening of forms, depending on "Code" and lines

9

Re: Subject of opening of forms, depending on "Code" and lines

Is not located with one file

10

Re: Subject of opening of forms, depending on "Code" and lines

[/code]
In request

[Forms]! [Data]! [Code]

[/quote]
At you in shape the Data the subordinate form [_1]. In request instead of [Forms]! [Data]! [Code] it is necessary [Forms]! [Data]! [_1]. [form]. [Code] Accordingly if you apply the filter in request - data source of the opened form in DoCmd. OpenForm "001 Card " anything else it is not necessary to write.

11

Re: Subject of opening of forms, depending on "Code" and lines

Stanokk;
Did not help

12

Re: Subject of opening of forms, depending on "Code" and lines

MrShin, and Stanokk
"Data Entry" should be ungeared, then
[Forms]! [Data]! [_1]. [form]. [Code] in request, and DoCmd. OpenForm "001 Card " in procedure of button click and In-and-lja, all earned!!!
All thanks, especially MrShin, and Stanokk
P.S.: it is pleasant to realize that there are clever, sympathetic and disinterested people!!!