Solved

Blanks with 2 Combo Boxes Linked On A Contiuous Form

Posted on 2011-03-20
3
324 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Create tables in access db (2016)  using vba 13 42
sql statement - 9 25
Delete QueryDef IF it Exists: Access VBA 5 36
DSN-LESS connection to MS Access database 6 30
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

809 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