Requery Subform

qwerty99

Registered User.
Local time
Today, 09:44
Joined
May 7, 2013
Messages
41
I am trying to do a test of something, mostly just to learn how to do it, that I feel should be incredibly simple, but I cannot for the life of me get to work.

All I am trying to do is get a subform to requery after choosing a name from a combobox on the subform itself, thus updating the records on the subform. I know this isn't something you should do, but please, just bear with me for my own sanity.

The main form name is "BasicTestOneF" the subform name is "ICminiBasicF" and the combobox name is "Combo4"

I have the combobox requery on After Update, but I still get the "Enter Parameter Value" popup.

I've spent the last hour and a half just trying to get this simple thing to work and have gone through I don't know how many sites and forum posts, tried every combination of VBA code I've found, and I still can't get it to work. Can someone please help me understand how to do this?
 
It sounds like the row source for the combo box either has a parameter or it has something misspelled or refers to something that isn't there. What is the SQL for the row source?

And post the code from the After Update event.
 
The After Update is just: Me.Requery

And the SQL is just:

SELECT ICInfoT.ICBusName
FROM ICInfoT;

I double checked and the names are correct. It's a very simple form because, again, I'm just wanting to learn how to do this and maybe use that knowledge later on.

Thanks for your help!
 
The form also works just fine by itself, its when I put it as a subform on another form that it doesn't work.
 
Is it in Access 2013? I have 2007 here at work and it is giving me an Unrecognized Database Format error when I try to open it.
 
The file's too big to upload without compressing. I don't know why this isn't working, I've uploaded this filed before, and I'm using 2007.
 
1. Are you on SP3 of Access? I have SP2.

2. Check your Zip Utility and make sure that it is NOT set to Maximum Compression. I"ve seen that cause problems before. Just set to Normal Compression.
 
OK, so I may have been wrong. When you open the file it says Access 2007 at the top of the screen, but just opening Access from the windows start button it says Access 2010. So I guess I do have 2010? Sorry about that.
 
Thanks michaeljryan78! Can you explain what it was that you actually changed to get it to work? I compared the property sheets of the one you fixed and the original and can't find any difference between the two.
 
Nevermind, figured it out. It was under the event procedure. Thanks again!
 
Follow up question. I have now put the form into a navigation form and I can't get it to work. I have a similar subform from which the user also selects a name to populate the information in that subform, which again works until put into the navigation form.

I know you have to change the code to show the form as a subform of the navigation form and I did that, but it still isn't working. I don't think the requery function is working. Does it have something to do with the multiple subforms?

To call the combobox I have:
[Forms]![NavnormF]![NavigationSubform].[Form]![Combo4]

The form is "NavnormF."

Can you help explain what I'm missing?
 

Attachments

Users who are viewing this thread

Back
Top Bottom