By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,827 Members | 2,220 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,827 IT Pros & Developers. It's quick & easy.

I need answer from PEB to Kazza to be clearer if possible (Filter combo)

P: 23
I think Kazza has the same problem.
I am very new at this
I also need to get the values from the combo selection
and put them in a table
I've tried to put the line in the criteria but I don't understand it much

=Forms![YourForm]![YourcOMBObOX]

What is Forms (Which form do I have to write in here?)
What is YourForm (Is this the form where the combo is in?)
What is YourCombo (Is it the name of the combo control?)

I suppose these are questions I should know, but I will
be very obliged if I could get a further explanation which
I'm certain will also please Kazza

If it is possible I would like a little comment of how this
line in the criteria will work
I can't imagine it
Thanks!
Nov 20 '06 #1
Share this Question
Share on Google+
2 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
I think Kazza has the same problem.
I am very new at this
I also need to get the values from the combo selection
and put them in a table
I've tried to put the line in the criteria but I don't understand it much
I haven't seen the other thread but I assume it refers to setting criteria on a query based on the value in a form. That doesn't sound like what you're asking.

Can you be more specific about what you are trying to do and post a copy of the address of the other question if you feel it's relevant as there are so many we would never find it.
Nov 20 '06 #2

P: 23
Hi This is what I have written so far
If it is not clear I can start all over again
Thanks!


In a combo box I need to get more than one value from the query
________________________________________
Hello!
I will try to explain the problem clearly
I am creating a database for my business (restaurant)
I have a table and a form called ‘suppliers’ which work perfecty well
The second table and form is called ‘products’
The fields are: ProductCode
Name
ProductType
TaxesType
A third table called ‘TaxPercentage’ consists of two fields:
TaxIndex
Percentage
A fourth table and form is called ‘Invoice’
The form ‘Invoice’ has a subform called ‘ProductInput’
And it is in this subform that I have the problem
It consists of the following fields:
Code
InvoiceCode
ProductCode
etc, etc
I use a combo box to get the name of the product
I set ‘Row source’ to a query that by means of ‘Name’ I get
The ‘ProductCode’
I set ‘Control source’ to ‘ProductCode’
But I should also get ‘ProductType’ and ‘TaxesTypes’ to get the percentage
from the ‘TaxPercentage’ table and put them in ‘ProductInput’ fields

I am sorry this seems to be badly expressed
Making a summary of it all I asked these questions:
In a combo box, by means of a query, how can I get the other fields of the table?
(I only get one)

If I have the value of a table field (say the code of a product)
How can I get other field values and with these get other values from
other tables?
Can this be achieve easily or should I do it with Visual basic?
Thanks for your time!

Joey


Hi Joey,
One way of doing this is to concatenate the values from your query into a single string value with a field name alias of your choice and set the control source to that field name, in this case ProdDetails:

Code:

SELECT ProductCode & ", " & ProductType & ", " & TaxesType As ProdDetails
FROM Product


Thanks for helping but I think I have not explained the problem very well

Now the other two fields are showing in the combo control but what I need
is to use the other fields of the record I choose to get access to other
tables.
Supose I have two products:
Wine and Milk
When I choose milk I need the taxesPercentage to go to the other table,
extract the value and place it in ProductInput table

It seems the more I write the more complicated it is
I am sorry
Nov 21 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.