Solved Form Combo Box Not Working Correctly (1 Viewer)

depawl52

New member
Local time
Today, 09:46
Joined
Feb 8, 2022
Messages
22
So in the attached database, as you can see there is a table and 2 forms. The CustomersList form opens showing general information, and then the CustomerDets form can be opened from the "Open" link on the CustomersList form, which is how the program is supposed to operate. When done this way, the "Go To Company" combo box on the CustomerDets form does not work at all. However when the CustomerDets form is opened directly from the Navigation pane, the combo box works as designed and allows one to select and view another Customer's Details. Been struggling with this for a few days, any suggestions pointing me in the right direction would be most appreciated, I fear it's something simple and obvious that I've overlooked.
Thank you.
 

Attachments

  • CustomerTest.accdb
    768 KB · Views: 239

June7

AWF VIP
Local time
Today, 05:46
Joined
Mar 9, 2014
Messages
5,425
Opening from List, form is filtered to single record. Have to remove this filter before searching for another record. Try adding
Me.Filter = ""
to beginning of AfterUpdate procedure.

The AfterUpdate code does not filter, it goes to. If you did that when form first opens instead of applying filter, the above would not be needed.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:46
Joined
Oct 29, 2018
Messages
21,358
Hi. Welcome to AWF!

Another option is to re-filter the form rather than navigate to the selected company. Just a thought...
 

depawl52

New member
Local time
Today, 09:46
Joined
Feb 8, 2022
Messages
22
Thank you.
Adding me.filter to the AfterUpdate procedure did it.
 

depawl52

New member
Local time
Today, 09:46
Joined
Feb 8, 2022
Messages
22
OK, so as a follow up to yesterday, in the same actual database I have an Orders table and forms related to the Customers table and forms discussed above. I've uploaded a trimmed down version with just the Orders portion, which follows the same logic. Now I have the same issue as per yesterday's post. Even after adding the me.filter = "" to the AfterUpdate procedure of the combo box, it does not seem to work correctly. If the DetailsF2 form is opened manually, the combo box operates correctly. If DetailsF2 is called from the "Open" link on the OrdersList form, the combo box does not work. I was literally up half the night working on this with no resolve. Many thanks in advance for any additional guidance.
 

Attachments

  • OrderTest.accdb
    2.6 MB · Views: 226

theDBguy

I’m here to help
Staff member
Local time
Today, 06:46
Joined
Oct 29, 2018
Messages
21,358
Hi. See if the attached helps.
 

Attachments

  • OrderTest.zip
    75.4 KB · Views: 225

depawl52

New member
Local time
Today, 09:46
Joined
Feb 8, 2022
Messages
22
Thanks so much DBguy. The answer is so simple it's almost embarrassing. At some point after I posted this morning I realized that on this (orders) portion of the database, I actually had the info in a subform, whereas with the Customers portion that I posted yesterday I didn't. But for some reason I thought that in the me.filter statement I had to refer to the subform from the main form, rather than the opposite.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:46
Joined
Oct 29, 2018
Messages
21,358
Thanks so much DBguy. The answer is so simple it's almost embarrassing. At some point after I posted this morning I realized that on this (orders) portion of the database, I actually had the info in a subform, whereas with the Customers portion that I posted yesterday I didn't. But for some reason I thought that in the me.filter statement I had to refer to the subform from the main form, rather than the opposite.
No worries, so long as you got it to work. Good luck with your project.
 

Users who are viewing this thread

Top Bottom