Its been a long time...need help

pujo

Well-known Member
Joined
Feb 19, 2009
Messages
605
(Access 2010)
Hello all,
It's been a long time since I've fooled around with Access and have an issue that I could use some help with...

I have a form containing a subform. The main form has 1 combo box linked to another table.
The subform record set is from a query. The query criteria is from the cbo on the main form and I have but a little vba behind the combo box on the main form to run the query to ensure it is working. The subform based on the query never populates but
the query will open and work correct however... I do not want it to open (I know its written in the code to open) and its not populating my subform thats based on the query.

Hope I explained all that correct. Anyway, hope you all can help me figure this out.
Thanks!

Code:
Private Sub cboPlatformSelect_Change()
Dim cboPlatformSelect As Control
DoCmd.OpenQuery "EquipmentQuery"
DoCmd.Requery
End SubPrivate Sub cboPlatformSelect_Change()
Dim cboPlatformSelect As Control
DoCmd.OpenQuery "EquipmentQuery"
DoCmd.Requery
End Sub
 

Some videos you may like

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

pujo

Well-known Member
Joined
Feb 19, 2009
Messages
605
It took all night and I guess I wasn't understanding what I was reading but I found my problem.
For anyone that is having the same issue here is what I was doing wrong.....

While the property of the subform "Link Master Fields" was set correctly to my combobox, the "Link Child Fields" was set incorrectly as I had it set to the primary key.
I changed the "Link Child Fields" to the corresponding field on the subform and presto! it worked.

Cheers!
PuJo
 

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
2,019
Office Version
  1. 365
Platform
  1. Windows

Watch MrExcel Video

Forum statistics

Threads
1,123,206
Messages
5,600,313
Members
414,375
Latest member
Onmyown

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top