How do I do This?

murlen

Registered User.
Local time
Today, 12:31
Joined
Nov 18, 2002
Messages
37
I would like to place a check box on my form and when 'checked' will proform
an append query to a table for the current record I am on.


any Ideas?

Murlen:confused:
 
On the AfterUpdate event of the checkbox, if the result is True execute your append query, otherwise, do nopthing.
 
I need to add records for TestID, TestNumber, TestDescription from CellTestInt table to Junction2 table and add records for TestID, TestNumber, TestDescription from SystemCheckInt table and records for System form Systems table to SystemTest table for the current record ChartInfo.ChartID. (note: records in both CellTestInt and SystemCheckInt are different)

Instead of opening an append query how do I write this in the code for the afterupdate procedure.

Murlen
 
I couldn't get the append quary to work with the current record
what needs to be in the quary to select the current recordset?
plus it would have to call two quarys

Thanks
Murlen

P.S.
here is one of my quarys
INSERT INTO Junction2 ( ChartID, TestID, TestNumber, TestDescription )
SELECT ChartInfo.ChartID, CellTest.TestID, CellTest.TestNumber, CellTest.TestDescription
FROM ChartInfo (not sure what this should be, CellTest
WHERE ChartInfo.ChartID not in (Select ChartID from Junction2);
 
okey I got it...

I used WHERE ChartInfo.ChartID = Forms!ChartInfo!ChartID

Next Question...
What if I didn't want the warning "you are about to run an append..." displayed
how do I just make it appendand ignore warnings?


Murlen
 
Docmd.setwarnings false

'your stuff

docmd.setwarnings true
 
Cool!
Thanks

I missed one thing from the append

I don't want to duplacate records allready enter so I was using "WHERE NOT IN"

How do I add this to the statment

INSERT INTO Junction2 ( ChartID, TestID, TestNumber, TestDescription )
SELECT ChartInfo.ChartID, CellTestInt.TestID, CellTestInt.TestNumber, CellTestInt.TestDescription
FROM ChartInfo, CellTestInt
WHERE ChartInfo.ChartID = Forms!ChartInfo!ChartID;
 
INSERT INTO Junction2 ( ChartID, TestID, TestNumber, TestDescription )
SELECT ChartInfo.ChartID, CellTestInt.TestID, CellTestInt.TestNumber, CellTestInt.TestDescription
FROM ChartInfo, CellTestInt
WHERE ChartInfo.ChartID = Forms!ChartInfo!ChartID AND NOT (whatever);
 
INSERT INTO Junction2 ( ChartID, TestID, TestNumber, TestDescription )
SELECT ChartInfo.ChartID, CellTestInt.TestID, CellTestInt.TestNumber, CellTestInt.TestDescription
FROM ChartInfo, CellTestInt
WHERE ChartInfo.ChartID = Forms!ChartInfo!ChartID AND NOT (whatever);

or Group the input records, eliminating duplicates.
 

Users who are viewing this thread

Back
Top Bottom