Help Required

  • Thread starter Thread starter Nano
  • Start date Start date
N

Nano

I need a little help while working of MS Access 2000.

I have a table which contians two columns labellbed as A and B. In
column A I can either enter Vegetable or Fruit (combo box). Now what I
want is that if I select Vegetable in Column A list of Vegetables
appear in colum B and vice versa.

I have tried to write queries and have tried other methods too but I
haven't been successful. I will be very thankful if someone can help
me in this regard.

Kind Regards,
Hasnain Raja
 
What you are asking is a very common question called a cascading combo.

NOTE: DON'T EVER USE TABLES FOR ENTERING INFORMATION. ALWAYS USE A FORM.

In the first combo I would select the source of the list as either
"Vegetable" or "Fruit".

I assume you have a table with two fields: the first determines the record
to be either "fruit" or "vegetable" and the second lists the names of fruit
and veg.

In the second combo of the form, go to the properties and click on "data".

Row source type should be set to "table/query"
Put the cursor into "row source" and click on the button on right hand side
that looks like "..."

Invoke the query builder.

Select the table

Insert the two fields.

In the criteria row for the "fruit"/"vegetable" type

[forms]![form name]![field name]

changing the second and third appropriately.

In the after update event of the combo type

me.FIELDNAME.requery

where fieldname is the name of the second combo.

Let me know!
 

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

Back
Top