Help!...I have 2 days.

Daxton A.

Registered User.
Local time
Today, 23:27
Joined
Dec 30, 2002
Messages
65
I have a problem in my query. I want to prompt the user for criteria using a custom dialog box form that i have made but my query will not run it. The problem comes when i type the formula in the Criteria cell.

I type:

Forms![Supplier Menu]![Supplier Menu]

then when i click elsewhere, ACCESS changes my formula to
[Forms!][Supplier Menu]![Supplier Menu]

the problem is the brackets that it automatically places around the "Forms" formula. I even copied the formula straight from the help screen AND i have used the Function Builder and ACCESS still places the brackets around "Forms" when i change the focus to another cell. This causes a meaningless custom dialog box to appear with the prompt "Forms!Supplier Menu!Supplier Menu. I have my own form with a combo box that has a list of available Suppliers to choose from so that i dont have to make a query for every Supplier. Any help at all would be MAGNIFICENT!
 
Try this

[Forms]![Supplier Menu].[Supplier Menu]

or

[Forms]![Supplier Menu]![Supplier Menu]

The top one should work fine though. THis has worked for me before.

Let me know how this turns out. :)

Good Luck,
 
All in all, this looks fine, the only thing I can think of is your second bang (!) sign should be a dot "." What type of control are you using on your form? If you are using a list box add a ".Value" to the end, but all other controls should be like I have below.

Try that.

Also, as current naming procedures dictate, try not using spaces in your field/variable names and all should be preceeded by a three letter lowercase prefix and you should capitalize the first letter of each word. Something like this:

[forms]![frmSupplierMenu].[cboSupplier]

Let me know if this works.
 
Sorry, looks like I jumped in there first. :)
 
Post an attachment of a piece of the database. Maybe if I can see it, it would help diagnose why this isn't working.
 
I played around with it, I'm not so sure the problem is with that piece of code. I think it may be a problem with another part of the query or the tables the query are being run from. I will check it all out and get back to you.
 
Daxton,

The syntax: [Forms]![Supplier Menu].[Supplier Menu]

will work when used in the criteria section of a query. With or
without the equal sign preceding it. When it prompts for the
value of:

Forms!Supplier Menu!Supplier Menu

that means that it can't correlate the name you supplied
in the criteria with a valid control.

I would first ensure that you have the proper name for
your combo-box and then that you're not missing something
like it's multi-column.

Need more info..

Good luck with the 2-day thing.

Wayne
 

Users who are viewing this thread

Back
Top Bottom