1

Topic: the data from a field with the list in the table.

All greetings.
Faced a problem.
In the table [Movement] there is the bound field [DocID].
As on the form there is a field with the list where from the qualifier (TypeDoc) the data is deduced.
If to select in the field with the list any value and to launch request (more low) beats out an error. Well and if to launch without Insert all is well deduced.

INSERT INTO Movement (DocID)
SELECT
[Forms]! [Packet]! [_Packet__] AS DocID
FROM Packet;

Source of lines for a field with the list

SELECT TypeDoc. ID, TypeDoc. DocName
FROM TypeDoc
WHERE (((TypeDoc. ID) <> 1))
ORDER BY TypeDoc. DocName;

2

Re: the data from a field with the list in the table.

25 years with Aksesom, but I feel here myself as the beginner. I understand nothing that people try to make.
In your first request you do  ALL values of the TABLE, and the data what for produce from a form field.
What sense in it?
And what relation has to the Insertion your field with the list?
And generally, that comes to the first mind:
The insertion normally does not work for following reasons:
1. A field
2. The field is fastened as Foreign Key and there are no appropriate values in Primary Key
3. The field itself Primary Key also does not resolve counterparts
4. The type or field size do not correspond to the interposed data.
Probably something else, but was clearer, if you though gave an error.

3

Re: the data from a field with the list in the table.

SandalTree;
I can also not correctly explained.
It is necessary to import the selected value from a field with the list to the table.
Why the field with the list gives value Null - I can not understand.
Error in nesting.

4

Re: the data from a field with the list in the table.

I the insignificant expert also can talk nonsense bosh.... Try that that of type
INSERT INTO Movement (DocID) values ([Forms]! [Packet]! [Spisok_Packet_Tip_Dokumenta]);

5

Re: the data from a field with the list in the table.

Devil_FoX wrote:

INSERT INTO Movement (DocID)
SELECT
[Forms]! [Packet]! [_Packet__] AS DocID
FROM Packet;

In SELECT the link in the field of the table or request, but not forms (and what for there  same as field name in the table-receiver is underlined. Read HELP about all it is written)

6

Re: the data from a field with the list in the table.

After:

Devil_FoX wrote:

... Why the field with the list gives value Null - I can not understand....

And you process what event?
In the subordinate form it is all happens automatically (if communication this field)

7

Re: the data from a field with the list in the table.

Devil_FoX wrote:

SandalTree;
I can also not correctly explained.
It is necessary to import the selected value from a field with the list to the table.
Why the field with the list gives value Null - I can not understand.
Error in nesting.

it was interesting to see THAT you try to push in the table, i.e. what result at you .
So it is quite good to see the table description "Movement".
Such impression that you interpose there "DocID", but any other field of this label resists to value Null

8

Re: the data from a field with the list in the table.

SandalTree wrote:

it was interesting to see THAT you try to push in the table, i.e. what result at you .

Yes, I showed only a request part where there is a problem. More low the full request.
All data from simple fields it is normally fulfilled. Table Packet - here always is stored only one line. At working off of the given field the error in the field with the list (earlier laid out it) is produced, but the line is added without problems, except a problem field (DocID) - it remains empty.
If to launch request without  DocID fulfills correctly and produces digit as well as it is necessary, and even it is possible to copy result and to import manually to the table and here any more there will be no problems. But already with  does not want to work
The field with the list is always filled before request actuating.

INSERT INTO Movement (PostID, AdrID, Annex, DocID, Date_DTZ, DocDate, SupplyDate, Date_Engineer;
Date_Lawyer, Date_Return_Lawyer, Date_Bookkeeper, Date_Return_Bookkeeper;
LawyerID, DocNum, Account, [Note], [Sum])
SELECT
Packet. PostID;
Packet. AdrID;
Packet. Annex;
[Forms]! [Packet]! [_Packet__] AS DocID;
[Forms]! [ADD_New_Doc]! [F_Date_DTZ] AS Date_DTZ;
[Forms]! [ADD_New_Doc]! [F_DocDate] AS DocDate;
[Forms]! [ADD_New_Doc]! [F_SupplyDate] AS SupplyDate;
[Forms]! [ADD_New_Doc]! [F_Date_Engineer] AS Date_Engineer;
[Forms]! [ADD_New_Doc]! [F_Date_Lawyer] AS Date_Lawyer;
[Forms]! [ADD_New_Doc]! [F_Date_Return_Lawyer] AS Date_Return_Lawyer;
[Forms]! [ADD_New_Doc]! [F_Date_Bookkeeper] AS Date_Bookkeeper;
[Forms]! [ADD_New_Doc]! [F_Date_Return_Bookkeeper] AS Date_Return_Bookkeeper;
[Forms]! [ADD_New_Doc]! [F_LawyerID] AS LawyerID;
[Forms]! [ADD_New_Doc]! [F_DocNum] AS DocNum;
[Forms]! [ADD_New_Doc]! [F_Account] AS Account;
[Forms]! [ADD_New_Doc]! [F_Note] AS [Note];
[Forms]! [ADD_New_Doc]! [F_Sum] AS [Sum]
FROM Packet;

9

Re: the data from a field with the list in the table.

All. We close a subject. Found the reason. All thanks.

10

Re: the data from a field with the list in the table.

Devil_FoX;
So in what put was?