Is it an Ms Access bug?

  • Thread starter Nick Dakoronias
  • Start date
N

Nick Dakoronias

Hello Forum users,

Any advise on the following will be much appreciated:

I have a customer who has created a form in Access which contains two combo
boxes. Then 2nd combo must be updated according to the 1st

He implemented exactly this:
http://office.microsoft.com/en-us/access/HA011730581033.aspx

The problem is that the query which contains the [Forms]![Combo
Form]![Category] can't get the value from Category combo and it's asking for
a value with a requester.

Any idea, what is wrong?



Thanks in advance

Rgds, Nick.
 
K

Ken Snell

Assuming that the form is named "Combo Form" and that the first combobox
control is named "Category", the code should work fine.

Normally, when running a SQL statement within a form this way, one doesn't
use the Forms![Combo Form]! syntax, and instead just uses the name of the
control:

WHERE (((Products.CategoryID)=
[Category]))

Is the second combobox on a subform, and the first combobox on a main form
that holds that subform?
 
B

Beetle

First thing to check would be the spelling of the form
and combo box names. Is your form named Combo Form?
Is your first combo box named Category?
 
T

Tony Toews [MVP]

Nick Dakoronias said:
The problem is that the query which contains the [Forms]![Combo
Form]![Category] can't get the value from Category combo and it's asking for
a value with a requester.

Open the forms. Open the query in design view and click on the box
containing the above field and clear it. Then click on the Build
button on the toolbar (looks like a wand with some stars), make the
box bigger by dragging on the lower right corner, then expand the
Loaded Forms item on the left hand side. Click on the form and you
will see a list of the controls in the middle box. Select the control
and click on Paste. Then click Ok.

Now the correct form and control name will be in the criteria field in
the query. Assuming this is a typo of some sort of course.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a free, convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
 

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