473,657 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ComboBox Progressive Requery

Thanks and would like to use your suggested join approach however
tblSub.FieldA is one field of a two field key (2nd key field say FieldB) for
tblSub. So need to exclude tblX.fieldAs in the combo box list only where
there is a saved record in tbl.Sub with the same tblSub.FieldB

Can you help with the join in this case where null case needs to be for both
FieldA and FieldB (or a combined field)

<pi********@hot mail.com> wrote in message
news:11******** *************@g 47g2000cwa.goog legroups.com...
use an outer join.
Say the datasource for the subform is tblSub
Also the rowsource for the combobox is something like
SELECT fieldA
FROM tblX
ORDER BY fieldA;

so you just change it a little...
SELECT fieldA
FROM tblX LEFT JOIN tblSub ON tblX.FieldA=tbl Sub.FieldA
WHERE tblSub.FieldA=N ULL
ORDER BY fieldA


Original post....

Am using a nested continuous bound subform to add multiple records to the
underlying table. One of the fields is based on a limit to list combo box.
Any suggestions on best way to progressively update the combo box query so
that for each new record being entered the combo box list excludes items in
the combo box list previously selected.

Aim is to prevent user from selecting the same combo list item more than
once if the user has already added a record previously using that list item.

The combo box field is part of the primary key for the underlying table and
am currently trapping the duplication error and then getting the user to
re-select a different combo box list item but would prefer removing the
previously selected & saved combo list item from the pick list.

This would allow me to also include logic to exclude mutually exclusive
items as well from the pick list.

Example in summary.

Combo box initial pick list items
A
B
C
D

To Avoid duplication - if user picks B and record is then saved, pick list
for the next record on the continuous subform becomes
A
C
D
For Mutually exclusive items - want say A & C to be mutually exclusive - if
user picks C and record is saved, pick list for the next record becomes
D

Any suggestions on best way to handle updating the selection criteria string
appreciated.

TIA, Bob

Dec 29 '05 #1
0 1173

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

Similar topics

3
2631
by: Pete | last post by:
I have a combobox which is used to select records, which is satisfactory at the moment. However, a second user is going to start using this database and there will be 1600 records. This makes the combobox a little unfeasable as searching through this many names would be difficult and time-consuming. I would like the user to be able to select a group of people from a first combobox, and then when he goes to the second, only the names of
0
1380
by: luci | last post by:
Hello I've developed several data access pages and I searched for the same problems in different internet pages but I never got back a usable answer. Here are my questions: 1) How is it possible to requery a single combobox in a data access page? Of course it's possible to requery the whole data access page (e.g. MSODSC.DataPages(0).Requery or window.location.reload(true)) But
3
3843
by: rmatteson | last post by:
I am trying to figure out how to clear all items from a combobox (Access 2002). On my form, I have to comboboxes. Combobox 2 is populated with a set of child data dependent on the parent data item selected in Combobox 1. This is done through the .AddItem method of Combobox 2 looping through the recordset. This works fine, until --> the data item in the Combobox 1 is changed, then Combobox 2 just appends the "new" related child data...
8
12090
by: Zlatko Matiæ | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the combobox. What is the solution? Thank you in advance.
6
8216
by: Gil | last post by:
Hello, I want a combox to requery each time it is being changed. What i am trying to do is have the combo box filter to the text being entered. The combo1 rowsource is: SELECT * FROM tbl WHERE field1 Like combo1 & "*" The code looks like this:
5
8111
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 requeried to immediately reflect these changes. The problem is that I can't requery in the OnDblClick event of the ComboBox because the event completes once the subform is launched. I guess I could requery the combobox from the Close event of the...
3
4268
by: ApexData | last post by:
COMBOBOX REFRESH DILEMMA ' I have been working for hours trying to figure out how to requery a combobox in a subform, from a Popup form ' that this subform had launched. Basically, I designed a form that pops up when the user dbl-clicks a combobox. ' This popup form displays the table that the combobox uses. The user can change the content, and the combobox ' rowsource in-turn will change. This all works great in my mainform, but...
34
20188
by: bitsnbytes64 | last post by:
Hi, I've been having a similar issue to what is described in the "refresh a form" post with a ComboBox that is not being refreshed after adding a new value on a seperate form. The second form is being opened via the standard DoCmd call. I've tried adding Requery in AfterUpdate, Form_Current, etc. to no avail.... The test form has the combobox and a command button. Here's my test code: Private Sub cmdAddCatgCd_Click() On Error GoTo...
4
4962
by: EManning | last post by:
I have a combobox whose rowsource is a union query. This query displays a person's name in "lastname, firstname" format and in "firstname lastname" format. The query results look like this: Mouse, Mickey Mickey Mouse When a person is added, the querys' underlying recordset is updated in the NotInList event. I can't figure out how to refresh the combobox to display the new person. I get the standard error message that the
0
8411
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, 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...
0
8838
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, 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...
0
8739
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
5638
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();...
0
4173
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...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2740
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
bsmnconsultancy
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...

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.