Mission impossible....????

  • Thread starter Thread starter rahmad
  • Start date Start date
R

rahmad

Hi All,
Sorry if this is a stupid question.
I have a maketable query.And run with filter on.
I have a wish, if currently the number of record returned is < 5,
it will populate become 5 records.So,everytime the query open,
it will return the no of record with folded 5.And for the value,
the default value or Null is OK,except the PK,must excatly same.

Any idea how to do that.?
 
Hi All,
Sorry if this is a stupid question.
I have a maketable query.And run with filter on.

Why do you need a maketable query AT ALL? They're very rarely needed.
I have a wish, if currently the number of record returned is < 5,
it will populate become 5 records.So,everytime the query open,
it will return the no of record with folded 5.

What does "folded" mean in this context? I guess I don't understand the
question.
And for the value,
the default value or Null is OK,except the PK,must excatly same.

Any idea how to do that.?

So you want to create a five record table, even if your query only returns
zero or one or two records?

Perhaps you could post the SQL of your query and describe what you want it to
accomplish. I suspect that a make-table is the wrong solution, but since I
don't know where you're going it's hard to say how to get there!

John W. Vinson [MVP]
 
I'm sorry for the misunderstanding Mr John,
It's my false.I'm doing this cause I want to manipulate
the data of my excel pivot table and it's chart which
connected to my db.

And I use a make table query just for trying to keep my original
data,if this manipulation worked well.

Here is my query's SQL statement:
============================================================================
==================================
SELECT [Model specification_tbl].Model, [Model specification_tbl].[Remark
rotation speed spec_1], [Model specification_tbl].[Rotation speed lo
limit_1], [Model specification_tbl].[Rotation speed hi limit_1], [Inspection
result_tbl].[Input date], [Inspection result_tbl].[Inspection date],
[Inspection result_tbl].[Lot no], [Inspection result_tbl].RPM_1, [Inspection
result_tbl].Inspector, Format([Inspection date],"mmm-yyyy") AS [Month] INTO
[X - R Chart Data_tbl]

FROM [Model specification_tbl] RIGHT JOIN [Inspection result_tbl] ON [Model
specification_tbl].Model = [Inspection result_tbl].Model

GROUP BY [Model specification_tbl].Model, [Model specification_tbl].[Remark
rotation speed spec_1], [Model specification_tbl].[Rotation speed lo
limit_1], [Model specification_tbl].[Rotation speed hi limit_1], [Inspection
result_tbl].[Input date], [Inspection result_tbl].[Inspection date],
[Inspection result_tbl].[Lot no], [Inspection result_tbl].RPM_1, [Inspection
result_tbl].Inspector, Format([Inspection date],"mmm-yyyy")

HAVING ((([Model specification_tbl].Model)=[Forms]![X - R Chart
Data]![list_Model]))

ORDER BY [Model specification_tbl].Model, [Inspection result_tbl].[Input
date], [Inspection result_tbl].[Inspection date], [Inspection
result_tbl].[Lot no], Format([Inspection date],"mmm-yyyy");

============================================================================
====================================


My query is build from two table : "Model specification_tbl" ( Model ==>
PK )
"Inspection result_tbl ( Input date ==> PK )
And the filter I said in my previous post is a criteria for Model.
I want Access to check the no of record in 'Inspection date' .
If actually,this query will return records that note fold 5 ( example : 12
records )
And in an 'Inspection date' there are no of records that < 5 ( 2 records )
then
it need to be populated in the table created by this query.
( That was I mean folded 5 )
'Model' PK might be duplicated or Null ,but 'Input date' PK must be
populated cause next time purposed for grouping the data.And another fields
may
contain Null or default value.

Hope this tell you clearly and Thank's for the response.
 
rahmad said:
I'm sorry for the misunderstanding Mr John,
It's my false.I'm doing this cause I want to manipulate
the data of my excel pivot table and it's chart which
connected to my db.

And I use a make table query just for trying to keep my original
data,if this manipulation worked well.

Here is my query's SQL statement:
============================================================================
==================================
SELECT [Model specification_tbl].Model, [Model specification_tbl].[Remark
rotation speed spec_1], [Model specification_tbl].[Rotation speed lo
limit_1], [Model specification_tbl].[Rotation speed hi limit_1], [Inspection
result_tbl].[Input date], [Inspection result_tbl].[Inspection date],
[Inspection result_tbl].[Lot no], [Inspection result_tbl].RPM_1, [Inspection
result_tbl].Inspector, Format([Inspection date],"mmm-yyyy") AS [Month] INTO
[X - R Chart Data_tbl]

FROM [Model specification_tbl] RIGHT JOIN [Inspection result_tbl] ON [Model
specification_tbl].Model = [Inspection result_tbl].Model

GROUP BY [Model specification_tbl].Model, [Model specification_tbl].[Remark
rotation speed spec_1], [Model specification_tbl].[Rotation speed lo
limit_1], [Model specification_tbl].[Rotation speed hi limit_1], [Inspection
result_tbl].[Input date], [Inspection result_tbl].[Inspection date],
[Inspection result_tbl].[Lot no], [Inspection result_tbl].RPM_1, [Inspection
result_tbl].Inspector, Format([Inspection date],"mmm-yyyy")

HAVING ((([Model specification_tbl].Model)=[Forms]![X - R Chart
Data]![list_Model]))

ORDER BY [Model specification_tbl].Model, [Inspection result_tbl].[Input
date], [Inspection result_tbl].[Inspection date], [Inspection
result_tbl].[Lot no], Format([Inspection date],"mmm-yyyy");

============================================================================
====================================


My query is build from two table : "Model specification_tbl" ( Model ==>
PK )
"Inspection result_tbl ( Input date ==> PK )
And the filter I said in my previous post is a criteria for Model.
I want Access to check the no of record in 'Inspection date' .
If actually,this query will return records that note fold 5 ( example : 12
records )
And in an 'Inspection date' there are no of records that < 5 ( 2 records )
then
it need to be populated in the table created by this query.
( That was I mean folded 5 )
'Model' PK might be duplicated or Null ,but 'Input date' PK must be
populated cause next time purposed for grouping the data.And another fields
may
contain Null or default value.

Hope this tell you clearly and Thank's for the response.
 
Back
Top