473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to Requery combobox in subform based on unbound parent form listbox

I have a combobox on a subform that is based on an SQL that uses a listbox on the unbound parent form as the criteria. When the form is first loaded, it works perfectly, limiting the dropdowns to only those associated with the listbox. However, when I update the listbox, I cannot get the combobox to requery. I've tried requery AfterUpdate on the listbox control, AfterUpdate on several subform controls, as well as trying to requery the combobox on several other events.

Any suggestions?

Thanks,
May 13 '10 #1
5 6222
Jerry Maiapu
259 100+
Try to requery the sub form using its on current event. If not try on parent form's on crrent event..

Just a suggest..
May 14 '10 #2
mseo
181 100+
hi,
when you open your mainform and change the data in the listbox
the combobox should have the same sql statement
and could be updated using
Expand|Select|Wrap|Line Numbers
  1.  private sub combo_box after_update()
  2. me.combo_box.requery
  3. end sub
if you found the combobox un-updated in this case just select any other item within the combobox then redrop down combobox you will find the combobox updated
hope this helps
May 14 '10 #3
NeoPa
32,556 Expert Mod 16PB
In the AfterUpdate event procedure for the ListBox on the main form add a call to .Requery the ComboBox on the subform. As you leave no name details I can only point you at Referring to Items on a Sub-Form for instructions on how to formulate the reference correctly.

Welcome to Bytes!
May 14 '10 #4
Thanks everyone. The On Current on the subform worked great. I had previously tried the afterupdate on the listbox on the mainform but I couldn't get it to work.
May 14 '10 #5
Jerry Maiapu
259 100+
Welcome to bytes
May 18 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
2
by: F. Michael Miller | last post by:
I need to requery a subform from a third form and can't seem to get it to work. frmForm1 has frmAddress as a subform. The button cmdReviseAddress opens the form frmUpdateAddress where all of my...
4
by: Gerry Abbott | last post by:
Hi all, A subForm control, txtTotalSubForm contains a total from one of the fields on this subForm . The mainForm contains a combo, myCombo which filters, and updates the details on the subForm. I...
5
by: superjacent | last post by:
Hope someone can help. I have a saved parent form containing an unbound sub-form. I set the SourceObject (form) after the Parent Form opens/loads. The sub-form (datasheet view) basically...
5
by: ApexData | last post by:
I have a ComboBox, when dblClicked, displays the combobox's row content in a continuous subform. Changes can be made to this content in the subform and then closed. The ComboBox needs to be...
9
by: cybervegan | last post by:
Hi, First, the background info: I have a parent form, New_Jobcard that contains a combo-box to select Cust_ID. The combobox shows customers sorted by name and address, like this: Cust_ID V ...
13
by: bitsnbytes64 | last post by:
Hi, I have a form which contains a subform. Both are were creetd using the form wizard and are bound by the column IXO_NR (on two different tables), which is the control source for a textbox on...
8
by: NJonge01 | last post by:
Great thanks to all the helpful responses I've read! Recently using MS Access after a lengthy (7-10 years) away from the tool. I apologize for posting a question that for all intents & purposes...
6
by: solom190 | last post by:
Okay this is the situation I have two forms and they have a 1:M relationship. I don't have enough space screen-wise to do a traditional "drag form to form" to create a subform so what I did was...
1
Jerry Maiapu
by: Jerry Maiapu | last post by:
Hi Please help. How can I delete i single record in a datsheet subform from main form using a delete button on the parent form.? i will be more grateful for your help... jm
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.