Adding 6 records with an append query.

M

Mel_P

Hello - I want to create a set of 6 records in an Access 2003(2000) database
for the input of a specific number. I can create a record thus (SQL from
append query):

INSERT INTO tblTest ( AssessmentID, AssessmentNumber, Hazard, [q(y/n)],
[c(y/n)], info, moreinfo )
SELECT [Input AssNo] & [Input Hazard] AS AssID, [Input AssNo] AS AssNo,
[Input Hazard] AS Haz, 'Y' AS q, 'N' AS c, 'lots' AS Inf, 'Lotsmore' AS
morinf;

[Input Hazard] has 6 values (e.g. AQ, BD, CE, DE, EG, FR) for each value of
Input AssNo - which is a number e.g. 1339?

A, B, C, D, E, F are always the same so they can be "hard coded".

How do I get a query create 6 records please when I input the AssNo?

Thanks, Mel
 
M

Mel_P

SELECT TOP .. - so if I put these (A, B, C, ..) in a Table . will try
playing tomorrow - not sure!

Thanks.

KARL DEWEY said:
Try this --
SELECT TOP 6 [Input AssNo] & [Input Hazard] AS AssID, ......
--
KARL DEWEY
Build a little - Test a little


Mel_P said:
Hello - I want to create a set of 6 records in an Access 2003(2000) database
for the input of a specific number. I can create a record thus (SQL from
append query):

INSERT INTO tblTest ( AssessmentID, AssessmentNumber, Hazard, [q(y/n)],
[c(y/n)], info, moreinfo )
SELECT [Input AssNo] & [Input Hazard] AS AssID, [Input AssNo] AS AssNo,
[Input Hazard] AS Haz, 'Y' AS q, 'N' AS c, 'lots' AS Inf, 'Lotsmore' AS
morinf;

[Input Hazard] has 6 values (e.g. AQ, BD, CE, DE, EG, FR) for each value of
Input AssNo - which is a number e.g. 1339?

A, B, C, D, E, F are always the same so they can be "hard coded".

How do I get a query create 6 records please when I input the AssNo?

Thanks, Mel
 

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