I have a form which combo boxes (say cmb1 and cmb2). The form also has a subform with a listbox whose rowsource is a query based on the values selected in the comboboxes.
In the After Update event for cmb2, I put Me.Requery.
When I select a value in cmb2, the values of the query results do not display in the listbox, but it does so the the correct record count at the bottom of the form, and it shows the correct record count whenever I change the values in the combo boxes.
I also noticed that when I switch to datasheet view, the correct number of rows display, but they are blank. In each row I can click on a drop down arrow and it will display the all the records of the query (for example, if there were two results, I see two rows each with a drop down arrow each of which show the same two records).
Thank you for any input
3 2170 ADezii 8,834
Recognized Expert Expert
You can directly Requery the List Box within the Sub-Form, as in: - Forms![<Form Name>]![<Sub Form Name>].Form![<List Box Name>].Requery
You can directly Requery the List Box within the Sub-Form, as in: - Forms![<Form Name>]![<Sub Form Name>].Form![<List Box Name>].Requery
This worked. Thank you Adezii
ADezii 8,834
Recognized Expert Expert
This worked. Thank you Adezii
You are quite welcome.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Debster |
last post by:
I am having a hard time trying to figure out why my code is not
working properly. I step through the code and check the values when
adding the data to the table, but my Refresh or Requery is not
displaying on the subform. Any suggestions? Thanks for your
help!!!!!!!!!!
********************** Code *************************************
Private Sub cmdOK_Click()
On Error GoTo Err_Handler
|
by: amywolfie |
last post by:
I have read the other posts on this topic, but didn't find an answer
specific to what I need.
I have a main form: frmFeeInput, which contains 2 subforms:
1) sfrmFootnotes
2) sfrmLoanProducts
When a data field in sfrmLoanProducts has a given primary key
(referenced in an IF statement in VBA), then I need to insert a record
into the Footnote join table.
|
by: Tim Marshall |
last post by:
Here's the situation. A form, frmSetUp, with a subform control called
subExplain with a source object form frmSetUpSubDefineSides. The source
object is a bound form, displaying a few records, no edit, adds,
filters, etc, are permitted on the subform.
An add or edit button on the subform is clicked opening an unbound form,
frmSetUpSideAdd, (populated with values from the above subform if this
is an edit of an existing record) for data...
|
by: Dave Boyd |
last post by:
Hi,
I have two very similar forms each with a subform. The main form gets
a few fields from the user and passes this back to a query that the
subform is bound to. The requery is done when the user enters the
last qualifying field on the main form.
In one case this works fine, the subform shows the data the user wants
to update -- which means showing all the data put in previously (ie
showing this via the requery and the continuous...
|
by: MLH |
last post by:
I have frmVehicleEntryForm and on it is frmAddnlOwnrListSubForm.
The subform is unbound and lists records in a table, allowing the
user to change values in CheckMark controls on the subform as
desired.
I have another button that will allow user to run a query which will
update the field values related to the checkmark control to False.
To be sure the changed values show up in the subform control, I'm
thinking of running a line like the...
| |
by: Kurt |
last post by:
I have an unbound main form with an unbound subform.
frmProjects
fsubProjectList
Using combo boxes, the user can select several search criteria on
frmProjects and then click a command button. The command button passes
the criteria as a string to a query. A subform, which is based on this
query, shows the results of the search.
|
by: panwala_bhavesh |
last post by:
I have a subform in continuous form style that I use to populate 3
fields (textboxes) on my main form with a double-click of the key-field
textbox of the sub:
Private Sub TextBattID_DblClick(Cancel As Integer)
Forms!. = Me!
Forms!. = Me!
Forms!. = Me!
End Sub
|
by: MarkoBBC |
last post by:
Hi everyone,
First a brief description of my form: I have a subform within a main form. In my subform, I have a listbox displaying address information by firm name. A user first has to select a firm name in a combo box above the list box. The listbox and the combo box join on firm name. The listbox records what address was selected in the address table by the way of an address id number. I set up a macro to requery the listbox when you...
|
by: Don Do |
last post by:
Ok, this is my 2nd ever post. 1st one was solved quickly. Thanks.
Now I'm stuck again. My mdb has a main form with 3 subforms. Each
tied to the succeeding by single autonumberID/foreign fields. Each of
the subforms is in continuous form format. The forms seems to work
well as far as viewing or adding records in each of the subforms,
except sbf2. After I have added records in sbf4, everything still
looks good. I can click around,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |