473,695 Members | 2,402 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 1175

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

Similar topics

3
2636
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
1381
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
12099
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
8218
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
20202
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
4963
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
8623
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
8562
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,...
0
9113
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...
1
8830
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6488
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4339
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
4575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2265
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1971
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.