Its been a long time...need help

pujo

Well-known Member
Joined
Feb 19, 2009
Messages
707
Office Version
  1. 2019
  2. 2013
Platform
  1. Windows
(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
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
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
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,213,521
Messages
6,114,104
Members
448,548
Latest member
harryls

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
Back
Top