append query

S

Simon

i have this append query its working apart from one bit
for the field Manufacure ID, i would like it to be the same number for
all the appened recored,
this number comes from the number dispalyed on the open form

How do i get it set up in the query that when it appends all the data
to the new table is also puts ManufactureID number next to all the
recores

[Forms]![frmManufactureTub]![ManufacuterID]
 
S

Steve Schapel

Simon,

In design view of the query, go to the View menu and select SQL. Then
copy/paste the SQL of the query you've got so far, into your reply here.
 
S

Simon

INSERT INTO tblManufacturePartsUsed ( ProductCode, Quantity,
ManufactureID )
SELECT tblManufactureParts.ProductCode, tblManufactureParts.Quantity,
Forms!frmManufactureTub!ManufactureID AS ManufactureID
FROM tblManufactureParts
WHERE
(((tblManufactureParts.IDNumber)=[Forms]![frmManufactureTub]![HotTubCode]));


it copys all the correct data each time but i just want the
ManufactureID number to be what ever appears on the form


Steve said:
Simon,

In design view of the query, go to the View menu and select SQL. Then
copy/paste the SQL of the query you've got so far, into your reply here.

--
Steve Schapel, Microsoft Access MVP
i have this append query its working apart from one bit
for the field Manufacure ID, i would like it to be the same number for
all the appened recored,
this number comes from the number dispalyed on the open form

How do i get it set up in the query that when it appends all the data
to the new table is also puts ManufactureID number next to all the
recores

[Forms]![frmManufactureTub]![ManufacuterID]
 
S

Simon

INSERT INTO tblManufacturePartsUsed ( ProductCode, Quantity,
ManufactureID )
SELECT tblManufactureParts.ProductCode, tblManufactureParts.Quantity,
Forms!frmManufactureTub!ManufactureID AS ManufactureID
FROM tblManufactureParts
WHERE
(((tblManufactureParts.IDNumber)=[Forms]![frmManufactureTub]![HotTubCode]));


it copys all the correct data each time but i just want the
ManufactureID number to be what ever appears on the form


Steve said:
Simon,

In design view of the query, go to the View menu and select SQL. Then
copy/paste the SQL of the query you've got so far, into your reply here.

--
Steve Schapel, Microsoft Access MVP
i have this append query its working apart from one bit
for the field Manufacure ID, i would like it to be the same number for
all the appened recored,
this number comes from the number dispalyed on the open form

How do i get it set up in the query that when it appends all the data
to the new table is also puts ManufactureID number next to all the
recores

[Forms]![frmManufactureTub]![ManufacuterID]
 
S

Simon

INSERT INTO tblManufacturePartsUsed ( ProductCode, Quantity,
ManufactureID )
SELECT tblManufactureParts.ProductCode, tblManufactureParts.Quantity,
Forms!frmManufactureTub!ManufactureID AS ManufactureID
FROM tblManufactureParts
WHERE
(((tblManufactureParts.IDNumber)=[Forms]![frmManufactureTub]![HotTubCode]));


it copys all the correct data each time but i just want the
ManufactureID number to be what ever appears on the form


Steve said:
Simon,

In design view of the query, go to the View menu and select SQL. Then
copy/paste the SQL of the query you've got so far, into your reply here.

--
Steve Schapel, Microsoft Access MVP
i have this append query its working apart from one bit
for the field Manufacure ID, i would like it to be the same number for
all the appened recored,
this number comes from the number dispalyed on the open form

How do i get it set up in the query that when it appends all the data
to the new table is also puts ManufactureID number next to all the
recores

[Forms]![frmManufactureTub]![ManufacuterID]
 
S

Steve Schapel

Simon,

I would expect this to work., so I'm not sure what the problem is. What
is actually happening?... Nothing at all going into the ManufactureID
field, or ther wrong value(s)?

Do you have a ManufactureID field in the tblManufactureParts table?
Your original tables list that you gave would suggest so. Of so, it is
not a good idea to have the reference to the from control aliased as
ManufactureID... In other words, the part of the SQL...
Forms!frmManufactureTub!ManufactureID AS ManufactureID
.... would be better as...
Forms!frmManufactureTub!ManufactureID AS SomethingElse

Another thought is that the current record in the frmManufactureTub form
needs to be saved to the table... is that the case? If not, try this
line in your code before running the append query...
DoCmd.RunCommand acCmdSaveRecord
.... or if you are using a macro...
RunCommand / SaveRecord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top