Why access keep asking to enter a parameter for a combo box??

Desperate

Registered User.
Local time
Today, 15:02
Joined
Apr 28, 2010
Messages
51
OK this will really drive me crazy. I have a main form with a 4 combo box 2 text box and a sub form which is from a select query.Select query should bring info based on any of these combo or text boxes.I write in the criteria of the query [Forms]![SearchF]![RecHeat] and similar to this to the "or" sections. At first it works perfect but after some time it starts to ask me to enter a parameter value for [Forms]![SearchF]![RecHeat]. It does not recognize the field from the form.Why cause this? I checked million times there is no typing error etc.
 
Access second guesses references if it doesn't find the exact one specified.

I think [Forms]![SearchF]![RecHeat] is technically a reference to a field in the recordset. Maybe Access got tired of guessing after a while.

Try refering to the combo contol as:
[Forms]![SearchF].[RecHeat]
or
[Forms]![SearchF].Form.[RecHeat]
 
Tried all but didn't work. How come select query doesn't recognize Forms!FormName!FieldName ??
 
Check your query "Forms!FormName!FieldName",
maybe you didn't write it properly.
 
Tried all but didn't work. How come select query doesn't recognize Forms!FormName!FieldName ??

I thought you were having problems getting Access to reliably recognise a reference to a combobox. Where does the field come into it?
 
Send a short example of your "mdb", (Access 2000 or 2002-2003).
 
Check if your FormName or FieldName include any blank.
 
I checked so many times. This is not about typing.I deleted my main form, sub form and query. I will do all from the beginning!
 
I checked so many times. This is not about typing.I deleted my main form, sub form and query. I will do all from the beginning!

Use this method to get the correct syntax (the example shows for a control source of a control but the process is the same if you use the builder).
 
At first it works perfect but after some time it starts to ask me to enter a parameter value for [Forms]![SearchF]![RecHeat]

Please clarify:

A: The query still works properly when first run but manifests the problem sometime during subsequent times that it is run.

B: The query previously worked but was subsequently modified and no longer works at all.
 
And again it happened.Now I will write you one by one to explain the problem clearly.
1)I made a blank form with 5 combobox and a tab control with 6 pages on it
2)I made 6 select queries. In each query there are 5 criteria in "or" sections based on these comboboxes. Forms!FormName!Combobox1,....Combobox2 etc.
3)Just to test queries, I tried each combobox and run queries.Working perfect.
4)As they were working, it was time to put my querie's subforms on these pages.(1 query per each page)
5)I tried each combo box with each query.Working perfect. Its filtering and all information appearing.Lovely..
6)I took backup of database, I put couple of queries and forms in the groups from the navigation pane which is on the left side.
7)Just to be sure I tried once more all queries and combos.Working perfect.
8)I took database in to my flash disk from the office computer, came to home put it in my laptop open the database click on the form and guess what?? it asks me to enter parameters!!!!!
Tomorrow morning I will go to office, open the database and it will ask me to enter parameters when I will try to open the form!!!
This is happening for the 3rd time.I wish I can handle my nerves and dont delete all database -.-
 
I import everything to a new access database and there everything works properly.This is getting more and more interesting. But this temporary solution does not quarantiee that an annoying "Enter a parameter" box will not appear after some time....
 
If importing to a new database file worked then it was corruption causing your problem and it could return. Is this database SPLIT into a frontend/backend (tables only in the backend) and a copy of the frontend on each user's machine? If not, it needs to be to avoid corruption.
 
It is not a split database. But once I finish I am planning to split it and put tables in the network for faster use by users.
-What may cause this corruption?Is there a way to understand and fix it?
-How can I guarantee that it will not appear again for users?
 
-What may cause this corruption?Is there a way to understand and fix it?
Likely because someone was in the database when a network disruption (perhaps so brief it was not noticeable) occurred.
-How can I guarantee that it will not appear again for users?

To guarantee it will not happen again you would have to use something other than Access. However, to mitigate the possibility of corruption you need to split the database and give each user a copy of the frontend and don't have them run it from the network location.

Do it now. Don't wait until you are finished. There is no reason you can't develop with a split database and you are less likely to lose the whole thing to corruption if you do.
 
Corruption can't be because of any network issue because database is still under development and I never used it under network.Probably there is something happening on the back ground which we can't know and access is trying to be smart and guess the location but comes up with a enter parameter dialog.
 
Corruption can't be because of any network issue because database is still under development and I never used it under network.Probably there is something happening on the back ground which we can't know and access is trying to be smart and guess the location but comes up with a enter parameter dialog.

Well corruption can be caused by quite a few things. Sometimes it just happens. My 14 years of working with Access has taught me a few things and that is corruption happens and many times you can't figure out the cause. But you can take steps to keep it from happening and killing your entire database. First, split off the tables from everything else. That actually helps, even if it is just on your computer.

Next, make sure you never change and save code while the code has been running and it is in Break mode (where it highlights an error and stops).

You might want to check out this web page by Access MVP Tony Toews which has many resources about corruption and recovering from corruption.
 
Thanks a lot for the advices. I am planning to migrate to a SQL server as it seems more reliable.Never tried before so no idea how hard it will be but as I read from many forums it will work far better under network.
 

Users who are viewing this thread

Back
Top Bottom