?
Solved

Blanks with 2 Combo Boxes Linked On A Contiuous Form

Posted on 2011-03-20
3
Medium Priority
?
348 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Suggested Courses

770 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