Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Blanks with 2 Combo Boxes Linked On A Contiuous Form

Posted on 2011-03-20
3
Medium Priority
?
354 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
GRayL earned 1500 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

610 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