473,395 Members | 1,649 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,395 software developers and data experts.

Requery of combobox doesn't show properly

Hi.

I have a text field (txtTX) and a combobox (cboCB). Both controls are on
2 different subforms (SF1 and SF2) belonging to the main form (MF).

MF -+- SF1 --- txtTX
+- SF2 --- cboCB

txtTX is used to fill cboCB. In other words, SF1 provides the data which
fills cboCB.

I created code (AfterUpdate of SF1) to update cboCB if one of the
records within SF1 changes. Here the code (nothing special!):

Forms!MF!SF2!cboCB.Requery

So far, everything is fine. Now ... as soon as I change the contents od
txtTX and I move to the next record in order to update SF1, I get the
following effect. cboCB is properly updated. But this shows only when I
select the arrow on the right of the cboCB control in order to look at
the items. The text part of the control however doesn't reflect the change.

How is that possible?

TIA

--
Georges
Nov 12 '05 #1
1 1805
On Wed, 04 Feb 2004 08:36:35 +0100, Georges Heinesch wrote:
Hi.

I have a text field (txtTX) and a combobox (cboCB). Both controls are on
2 different subforms (SF1 and SF2) belonging to the main form (MF).

MF -+- SF1 --- txtTX
+- SF2 --- cboCB

txtTX is used to fill cboCB. In other words, SF1 provides the data which
fills cboCB.

I created code (AfterUpdate of SF1) to update cboCB if one of the
records within SF1 changes. Here the code (nothing special!):

Forms!MF!SF2!cboCB.Requery

So far, everything is fine. Now ... as soon as I change the contents od
txtTX and I move to the next record in order to update SF1, I get the
following effect. cboCB is properly updated. But this shows only when I
select the arrow on the right of the cboCB control in order to look at
the items. The text part of the control however doesn't reflect the change.

How is that possible?

TIA


Requerying a combobox does not reset it's value (what is displayed), it
only resets what is displayed as the possible choices in the list. If you
want the value to change, you'll need to change this on top of the requery
you currently have.

--
Mike Storr
veraccess.com
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Dos Lil | last post by:
I have a comobox in the main form which has a query attached to it to list the employee numbers.I have written this code to requry the control in the control's after update event Private Sub...
3
by: geribosi | last post by:
I have a question that may have been asked numerous times, however from the previous postings no one seems to have a plausible explanation. This is a performance issue that is very common: I...
5
by: Giloosh | last post by:
Hello, I have a combobox with a rowsource of two fields. and even though the combobox only shows the name, when i pull down the name i grab the id that it belongs to like this: 'AFTERUPDATE:...
1
by: piet | last post by:
I have created a continues form, based on a query. In the header, there are some comboboxes that gives the user the possibility to make certain selections. Everytime a selection is made on a...
0
by: Budinski | last post by:
I have a subform that has a datasheet in it. In the datasheet I have multiple records. Each record has many textboxes and combo boxes. I have a particular combobox with 2 columns, Column 1 has the...
14
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....
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...
2
by: Swinky | last post by:
Can someone explain to me the proper syntax for requery and where to input it in my form? I have a main form "Account-Master" with two subforms: 1.) Contacts and 2.)TNotes. The TNotes subform...
4
theaybaras
by: theaybaras | last post by:
Hi All... I've read both of the requery discussions I could find... Refresh ComboBox After Adding New Values via a Seperate Form and refresh a form but am not quite able to get this to apply...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...
0
agi2029
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,...

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.