Form still prompts for parameter after query deleted (1 Viewer)

rzw0wr

I will always be a newbie
Local time
Today, 03:44
Joined
Apr 1, 2012
Messages
489
A big healthy YES.
That would be the best practice method and the one most advised to use.

Summary: Never change a control name if it is the name of a control you have already assigned a name.
One side note here just to confuse you more.
Form names.
I will change the name of a Access assigned name on a subform on the property sheet. There I still use the real form name but Access will give it a funky name if you let it.
I will add a recognizable or logical name in the Caption on the form property sheet for the form. Access ignores the Captions on forms.

Dale
 

Reese

Registered User.
Local time
Today, 03:44
Joined
Jan 13, 2013
Messages
387
Thank you very much! Hopefully this will help prevent issues in the future.

I'll still this thread open in case anyone has any ideas on how to solve the "ghost query" situation, other than going back to a several day old back up. If anyone has any ideas please let me know. Thanks!
 

GanzPopp

Registered User.
Local time
Today, 09:44
Joined
Jan 14, 2013
Messages
37
Looking at the database you posted several posts earlier: if you select the query 'ZooMobile Cost Query' and then via the Database Tools click 'Object Dependencies' you will see that the forms you mention depend on this query. Open the query in SQL mode and you will see that the first lines reads:
Code:
PARAMETERS [Forms]![ZooMobile Event Booking].[ClientIDTxt] Text ( 255 );
That is causing the prompts when you are opening the forms. Remove it and the message will be gone.

The Object Dependencies window is a useful tool to investigate what depends on what. Use it wisely! :)
 

boblarson

Smeghead
Local time
Today, 00:44
Joined
Jan 12, 2001
Messages
32,059
Alias means to rename something.
Your field names should never be renamed to something else.
Never is a strong word. I rename them many times to be able to make things work better. I also rename all of my controls so that they are NOT named the same as the fields so that I know explicitly if I am working with a field or an object on a form/report. So, with a field like ClientID I would have the text box it is bound to named txtClientID which then I can look and immediately know that ClientID is a field and txtClientID is a text box.

Now, that being said, it is wise to choose a method and stick with it whatever it is so it is consistent.

Also,
Reese said:
in case anyone has any ideas on how to solve the "ghost query" situation

What "ghost query" situation? I am confused. What is happening again? I downloaded your database, removed that parameter from the query and then all was working fine for me. If you deleted that query (ZooMobile Cost Query) but didn't delete the subform that was using it for its record source (ZooMobile Cost Subform) then it would generate an error as that subform would not be able to find its record source. You didn't need to delete the query, just delete the parameters from the parameters list.



 

Attachments

  • 5-19-2013 3-06-29 PM.jpg
    5-19-2013 3-06-29 PM.jpg
    72.1 KB · Views: 303
  • 5-19-2013 3-08-13 PM.jpg
    5-19-2013 3-08-13 PM.jpg
    57.1 KB · Views: 334

rzw0wr

I will always be a newbie
Local time
Today, 03:44
Joined
Apr 1, 2012
Messages
489
Come on Bob.
Give me a break.
Reese is a newbie in trouble.

I rename things also.
We don't need to cloud his issues any more than they are.

Dale
 

boblarson

Smeghead
Local time
Today, 00:44
Joined
Jan 12, 2001
Messages
32,059
Come on Bob.
Give me a break.
Reese is a newbie in trouble.

I rename things also.
We don't need to cloud his issues any more than they are.
Sorry but I don't see it the same way you are seeing it. As I said, renaming controls to something standard and other than the exact field name makes it EASIER, not harder. If you know what you are dealing with it makes it easier when you are wanting to refer to a CONTROL and not the field. If you leave them the same (and I know Galaxiom is of the mindset to leave them both the same name and we don't see eye to eye on that) I have found that it can confuse matters at times. And, as I said, I believe it is actually easier so to introduce a newbie to that concept shouldn't confuse things but in fact clarify things.
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 17:44
Joined
Jan 20, 2009
Messages
12,856
If you leave them the same (and I know Galaxiom is of the mindset to leave them both the same name and we don't see eye to eye on that) I have found that it can confuse matters at times.

Bob: The "mindset" is yours. You have fixated on your habitual practices without evidence. You may well be confused but it is because you do not understand the behaviour of Access and refuse to be instructed.

Indeed you have made statements contrary to the evidence and failed to respond when it was pointed out to you.

See the discussion in posts 10 to 13 in this thread.

So have you used Access 2010 or 2013? There is intellisense in queries now and it chooses the field name by default instead of the control.

It certainly doesn't in 2010. In fact the field is not even offerred by Intellisense if the control by that name is present.

Controls is the default collection of the Form. This has been the case in Access 2003, 2007 and 2010 and I very much doubt that it would be changed for 2013.

If you wish to disagree then please provide just one verifiable example of Access taking an unqualified reference as the field rather than the control where both are present. (Then we can report the bug to Microsoft.)

As I have said before, I don't disagree with your personal preference for changing the control names if that suits you. However I consider it a waste of time.

Moreover I strongly object to your implication that there is any reason to be confused and to promote the practice on that basis.
 

Reese

Registered User.
Local time
Today, 03:44
Joined
Jan 13, 2013
Messages
387
Whoa! I've accidentally sparked a powder keg here with this whole control name thing. As a newbie, I have no idea which is correct. I don't want to continue coding as I have been and cause issues, but at the same time, I'd rather not have to go through re-naming everything.

Since there are conflicting views from people more experienced than I, I'll do some research on this before I make any other changes. In the meantime I can continue doing some other stuff without having to mess with the names.

Back to the original problem... Hazaa!

Looking at the database you posted several posts earlier: if you select the query 'ZooMobile Cost Query' and then via the Database Tools click 'Object Dependencies' you will see that the forms you mention depend on this query. Open the query in SQL mode and you will see that the first lines reads:
Code:
PARAMETERS [Forms]![ZooMobile Event Booking].[ClientIDTxt] Text ( 255 );
That is causing the prompts when you are opening the forms. Remove it and the message will be gone.

Thank you GanzPopp & boblarson, who pointed out the same thing. I wasn't aware that the parameter was in there. It didn't need to be and I don't remember placing it in there. The query that I had deleted--and had originally intended that parameter for--was a different query entirely; which is why I called it a "ghost query."

So while I have no idea HOW this happened, the problem has been corrected. Thank you everyone.
 

rzw0wr

I will always be a newbie
Local time
Today, 03:44
Joined
Apr 1, 2012
Messages
489
Reese, If you can live with the way your database is there is not a problem here.
In Access the is always a conflict about how to do something.

Continue with your database in whatever fashion you choose, That is one of the nice things about Access. You can kind of roll your own.

I learned so much from my first few databases I rewrote them as a practice/text to see if I could make them better.

Keep up the good work. Each database is your own.

Dale
 

boblarson

Smeghead
Local time
Today, 00:44
Joined
Jan 12, 2001
Messages
32,059
Bob: The "mindset" is yours. You have fixated on your habitual practices without evidence. You may well be confused but it is because you do not understand the behaviour of Access and refuse to be instructed.

Indeed you have made statements contrary to the evidence and failed to respond when it was pointed out to you.

See the discussion in posts 10 to 13 in this thread.



It certainly doesn't in 2010. In fact the field is not even offerred by Intellisense if the control by that name is present.

Controls is the default collection of the Form. This has been the case in Access 2003, 2007 and 2010 and I very much doubt that it would be changed for 2013.

If you wish to disagree then please provide just one verifiable example of Access taking an unqualified reference as the field rather than the control where both are present. (Then we can report the bug to Microsoft.)

As I have said before, I don't disagree with your personal preference for changing the control names if that suits you. However I consider it a waste of time.

Moreover I strongly object to your implication that there is any reason to be confused and to promote the practice on that basis.

I had problems in the past. You ask me what. I had changed to renaming so I have not had any ANY problems with any controls or fields in now going on at least 7 years. Since I do not use them I can't specify so I will make this deal. I will not say anything to anyone ever again here about control naming. Satisfied? I don't have time to pull together examples so I'll just shut the hell up.
 

Users who are viewing this thread

Top Bottom