Avatar of Fordraiders
Fordraiders
Flag for United States of America asked on

clear subform

Access 2010:
I have a subform: but it is not master child linked.

This is the name:
dbo_t_redbook_pricing_escalation_detail_subform

This is the "source Object" :
dbo_t_redbook_pricing_escalation_detail_subform

I'm trying to clear the subform out...
But it just appears white and blank..

by using.
Dim temp As String
temp = ""
temp = dbo_t_redbook_pricing_escalation_detail_subform.SourceObject
dbo_t_redbook_pricing_escalation_detail_subform.SourceObject = temp

me.dbo_t_redbook_pricing_escalation_detail_subform.requery

I want to clear it as if i just opened the database. form

trying to reset the recordsource via sql but saying it is to complex ?
Dim strSQL As String
strSQL = "SELECT TOP 5 dbo_t_redbook_pricing_escalation_detail.[AUTO_ID], dbo_t_redbook_pricing_escalation_detail.[RBP_MASTER_ID], dbo_t_redbook_pricing_escalation_detail.[SKU], dbo_t_redbook_pricing_escalation_detail.[PRODUCT_DESCRIPTION], dbo_t_redbook_pricing_escalation_detail.[QTY], dbo_t_redbook_pricing_escalation_detail.[TARGET_PRICE], dbo_t_redbook_pricing_escalation_detail.[COMPETITOR_PRICE], dbo_t_redbook_pricing_escalation_detail.[TARGET_GP], dbo_t_redbook_pricing_escalation_detail.[CURRENT_PRICE], dbo_t_redbook_pricing_escalation_detail.[CURRENT_GP], dbo_t_redbook_pricing_escalation_detail.[VENDOR_GUIDELINE_GP], dbo_t_redbook_pricing_escalation_detail.[APPROVED_PRICE], dbo_t_redbook_pricing_escalation_detail.[APPROVED_GP] From dbo_t_redbook_pricing_escalation_detail WHERE dbo_t_redbook_pricing_escalation_detail.RBP_MASTER_ID= [Forms]![Main]![PRICING_ESCALATION_ID]"
Me.dbo_t_redbook_pricing_escalation_detail_subform.Form.RecordSource = strSQL




Thanks
fordraiders
Microsoft Access

Avatar of undefined
Last Comment
crystal (strive4peace) - Microsoft MVP, Access

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Rey Obrero (Capricorn1)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
crystal (strive4peace) - Microsoft MVP, Access

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23