Solved

Blanks with 2 Combo Boxes Linked On A Contiuous Form

Posted on 2011-03-20
3
303 Views
Last Modified: 2012-06-27
Hi EE,
I have a continuous subform that contains two combo boxes (cb) per record.  The first (cb) refers to an AcctID and the second (cb) to a SubAcctID, each bound by an ID, but displaying a description.  When the User selects an AcctID with the first (cb), the second will be filtered with only the SubAcctID's that have the selected AcctID. That part works fine. I am using the query criteria "[Forms]![frmMain]![frmSub].[Form]![AcctID]" to filter the SubAcctID (cb).  

The problem I am having is when a User goes to a new record the SubAcctID (cb) on the prior records goes blank if a different AcctID is selected, but not if the same AcctID is selected.  The ID's are still attached to the record, but the (cb) is displaying a blank.  I tried a requery,

Private Sub AcctID_AfterUpdate()
Me.SubAcctID.Requery

but it did not help. Any ideas where I am going wrong?
 
Thank you for your time,
Steve
0
Comment
Question by:SteveStew4444
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
GRayL earned 500 total points
ID: 35176710
Change:

Me.SubAcctID.Requery

to:

Me.Form.sfmName.Requery

sfmName being the actual name of your subform control.  If Requery does not work, try Refresh.
0
 

Author Closing Comment

by:SteveStew4444
ID: 35176889
Did not apply totally
0
 

Author Comment

by:SteveStew4444
ID: 35176914
Hi GRayL,
Thanks for the reply.
I believe since "Private Sub AcctID_AfterUpdate()" is in the subform with the other control, i don't need to refer to the parent.
By the way, I fixed the issue by finding an article with a really cool trick that made it work like a charm.
Here's the link:  http://www.vb123.com/kb/index.html?200602_ds_control.htm
Thank you anyway!
Steve
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now