combo box filter source

  • Thread starter bigwillno2 via AccessMonster.com
  • Start date
B

bigwillno2 via AccessMonster.com

I have tried everything that comes to mind and many examples from this source,
but i dont seem to get this working and i cant see where i am going wrong.

i have:
1 unbound form call frmPrototype
1 unbound combo box called cboPrototype with a table/query tblPrototype
1 subform called subPrototypeform with row source of a query

what i want to do is filter the subform through a selection from the combo
box.

i have tried setting the combo box as a criteria in the subform query and
also tried setting the link master to the combo box and link child to the
pertaining field on the subform.

can somone help me please.
 
G

Guest

i have tried setting the combo box as a criteria in the subform query
Post your SQL where you did the above.
 
B

bigwillno2 via AccessMonster.com

thanks for the quick answer Karl. Here is my SQL

SELECT MSM.ModelNumber, tblProtoType.ProtoType
FROM tblProtoType INNER JOIN MSM ON tblProtoType.ProtoType = MSM.ProtoTypeNum
WHERE (((tblProtoType.ProtoType)=[forms]![frmPrototype]![cboPrototype]));

again what i want to do is filter subform which has a row source this query.
thanks in advance

KARL said:
Post your SQL where you did the above.
I have tried everything that comes to mind and many examples from this source,
but i dont seem to get this working and i cant see where i am going wrong.
[quoted text clipped - 12 lines]
can somone help me please.
 
G

Guest

Test what you are getting from the combo box like this ---
SELECT MSM.ModelNumber, tblProtoType.ProtoType,
[forms]![frmPrototype]![cboPrototype]
FROM tblProtoType INNER JOIN MSM ON tblProtoType.ProtoType = MSM.ProtoTypeNum;


--
KARL DEWEY
Build a little - Test a little


bigwillno2 via AccessMonster.com said:
thanks for the quick answer Karl. Here is my SQL

SELECT MSM.ModelNumber, tblProtoType.ProtoType
FROM tblProtoType INNER JOIN MSM ON tblProtoType.ProtoType = MSM.ProtoTypeNum
WHERE (((tblProtoType.ProtoType)=[forms]![frmPrototype]![cboPrototype]));

again what i want to do is filter subform which has a row source this query.
thanks in advance

KARL said:
i have tried setting the combo box as a criteria in the subform query
Post your SQL where you did the above.
I have tried everything that comes to mind and many examples from this source,
but i dont seem to get this working and i cant see where i am going wrong.
[quoted text clipped - 12 lines]
can somone help me please.
 
B

bigwillno2 via AccessMonster.com

Hi Karl

what i get is:

modelNumber, prototype, and primary key for whatever i select from the combo.

e.g. i picked the first one...and it game me 1 in the third column. what
would be next?

KARL said:
Test what you are getting from the combo box like this ---
SELECT MSM.ModelNumber, tblProtoType.ProtoType,
[forms]![frmPrototype]![cboPrototype]
FROM tblProtoType INNER JOIN MSM ON tblProtoType.ProtoType = MSM.ProtoTypeNum;
thanks for the quick answer Karl. Here is my SQL
[quoted text clipped - 12 lines]
 
B

bigwillno2 via AccessMonster.com

Hey Karl

i got it....what i was doing wrong is that i bounded my combo box to the
first column which is the primary key, i changed it to the second column, now
it works. thanks....can you help me with something else though....

i have this query:

SELECT LinkedSalesOrder.OrderNo, LinkedSalesOrder.ID, LinkedSalesOrder.
RequiredDate, LinkedSalesOrder.ID_1, LinkedSalesOrder.OrderQty,
LinkedSalesOrder.Description, LinkedSalesOrder.Comment1 AS Comment,
LinkedSalesOrder.Type
FROM LinkedSalesOrder LEFT JOIN MSM ON LinkedSalesOrder.ID_1 = MSM.
ModelNumber
GROUP BY LinkedSalesOrder.OrderNo, LinkedSalesOrder.ID, LinkedSalesOrder.
RequiredDate, LinkedSalesOrder.ID_1, LinkedSalesOrder.OrderQty,
LinkedSalesOrder.Description, LinkedSalesOrder.Comment1, LinkedSalesOrder.
Type, MSM.ModelNumber
HAVING (((LinkedSalesOrder.ID_1) Like "*O") AND ((LinkedSalesOrder.Type)=6)
AND ((MSM.ModelNumber) Is Null)) OR (((LinkedSalesOrder.ID_1) Like "*50")) OR
(((LinkedSalesOrder.ID_1) Like "*P")) OR (((LinkedSalesOrder.ID_1) Like "*33")
) OR (((LinkedSalesOrder.ID_1) Like "*46")) OR (((LinkedSalesOrder.ID_1) Like
"*66")) OR (((LinkedSalesOrder.ID_1) Like "*67")) OR (((LinkedSalesOrder.ID_1)
Like "*XL"));



what i have: two listbox, one with this query above and another one of other
query. one unmatching and one matching.

what i am doing....i am matching incoming data with what's already exist in
the database. and if doesnt match it appear here in this query. i want to
match everything ending with O, 50, 46, 33, 67, 66 and XL.
When recognized as existing, it shouldnt appear in this query. but even
though it's recognized and it appear in the matching list, it still appears
in the unmatching which is the one above. can you check what's wrong with it..
..and i hope i am explaining this right....thanks again.



Hi Karl

what i get is:

modelNumber, prototype, and primary key for whatever i select from the combo.

e.g. i picked the first one...and it game me 1 in the third column. what
would be next?
Test what you are getting from the combo box like this ---
SELECT MSM.ModelNumber, tblProtoType.ProtoType,
[quoted text clipped - 6 lines]
 

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