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

Combo Box - Storing Results

Hi

I am desparately looking for advice in relation to storing the results
after selecting items from two combo boxes on a Referral form. The
first combo box 'ctl Type' displays a full list of Agency Types, then
the 2nd combo box displays a list of Organisations, depending upon the
Agency Type Selected.

The first combo box 'ctlType' (Unbound), Row Source: to field
[OrganisationType] in 'AgencyReferralType'.

The second combo box 'ctlAgency', Row Source: to
[AgencyNameid],[organisationtype],[AgencyName] in 'qryAgencyType'
I have set the criteria for this [organisationtype]to
[forms]![frmreferralto]![ctltype].

The first combo displays the correct sub-list in combo 2 but the
values are empty when the form is re-opened.

Can anyone please provide any feedback as to what I am doing wrong.

Many Many Thanks.
Nov 12 '05 #1
4 4236
There are 2 solutions here. The first would be include a field in the
recordset that stores the value of your first combo box. The second would be
to include code in the On Current Event procedure for your form that looks
at the stored value of the second combo box and displays the correct value
of the first combo box. e.g. using the row sources given
If Not IsNull(Me!ctlAgency.Column(1)) Then
Me!ctlType = Me!ctlAgency.Colomn(1)
End If
"Heather" <he*********@optusnet.com.au> wrote in message
news:9a**************************@posting.google.c om...
Hi

I am desparately looking for advice in relation to storing the results
after selecting items from two combo boxes on a Referral form. The
first combo box 'ctl Type' displays a full list of Agency Types, then
the 2nd combo box displays a list of Organisations, depending upon the
Agency Type Selected.

The first combo box 'ctlType' (Unbound), Row Source: to field
[OrganisationType] in 'AgencyReferralType'.

The second combo box 'ctlAgency', Row Source: to
[AgencyNameid],[organisationtype],[AgencyName] in 'qryAgencyType'
I have set the criteria for this [organisationtype]to
[forms]![frmreferralto]![ctltype].

The first combo displays the correct sub-list in combo 2 but the
values are empty when the form is re-opened.

Can anyone please provide any feedback as to what I am doing wrong.

Many Many Thanks.

Nov 12 '05 #2
I'm not sure I understand your problem. What do you think should be
displayed in the second combo box?

I am assuming you use the change event of the first combo box to
requery the second combo box. What is displayed in the first combo
box when "the form is re-opened"? If you are setting a default value
in the first combo box and you want the second combo box to display
the values associated with the default value, all you need to do is
requery combo 2 on the form's open event.

Let me know if you need some additional info.

Jeff
he*********@optusnet.com.au (Heather) wrote in message news:<9a**************************@posting.google. com>...
Hi

I am desparately looking for advice in relation to storing the results
after selecting items from two combo boxes on a Referral form. The
first combo box 'ctl Type' displays a full list of Agency Types, then
the 2nd combo box displays a list of Organisations, depending upon the
Agency Type Selected.

The first combo box 'ctlType' (Unbound), Row Source: to field
[OrganisationType] in 'AgencyReferralType'.

The second combo box 'ctlAgency', Row Source: to
[AgencyNameid],[organisationtype],[AgencyName] in 'qryAgencyType'
I have set the criteria for this [organisationtype]to
[forms]![frmreferralto]![ctltype].

The first combo displays the correct sub-list in combo 2 but the
values are empty when the form is re-opened.

Can anyone please provide any feedback as to what I am doing wrong.

Many Many Thanks.

Nov 12 '05 #3
What Heather's problem is that the first combo box is unbound and that is
the reason why it's empty when the form is reopened. She has no problem with
the second combo displaying the correct data after an item has been
selected.

Stewart
"jeff colton" <co******@hotmail.com> wrote in message
news:b0**************************@posting.google.c om...
I'm not sure I understand your problem. What do you think should be
displayed in the second combo box?

I am assuming you use the change event of the first combo box to
requery the second combo box. What is displayed in the first combo
box when "the form is re-opened"? If you are setting a default value
in the first combo box and you want the second combo box to display
the values associated with the default value, all you need to do is
requery combo 2 on the form's open event.

Let me know if you need some additional info.

Jeff
he*********@optusnet.com.au (Heather) wrote in message

news:<9a**************************@posting.google. com>...
Hi

I am desparately looking for advice in relation to storing the results
after selecting items from two combo boxes on a Referral form. The
first combo box 'ctl Type' displays a full list of Agency Types, then
the 2nd combo box displays a list of Organisations, depending upon the
Agency Type Selected.

The first combo box 'ctlType' (Unbound), Row Source: to field
[OrganisationType] in 'AgencyReferralType'.

The second combo box 'ctlAgency', Row Source: to
[AgencyNameid],[organisationtype],[AgencyName] in 'qryAgencyType'
I have set the criteria for this [organisationtype]to
[forms]![frmreferralto]![ctltype].

The first combo displays the correct sub-list in combo 2 but the
values are empty when the form is re-opened.

Can anyone please provide any feedback as to what I am doing wrong.

Many Many Thanks.

Nov 12 '05 #4
D
I've been banging my head against this for a long time. This would be a
great thing to do from an interface point of view, but it's breaking my
back! (I'm used to doing everything myself in PHP, so Access' event model is
a bit of a struggle).

My problem is the OnCurrent event with continuous forms. When an item is
chosen from the first combo, the same item is chosen in all the combos on
the form, and the bound values in the second combos disappear.

I also tried creating a bound first combo, but this time the second combo
was buggy in continuous forms.

Anyone explain a bulletproof solution to this?

D


"Stewart Allen" <sa****@REMOVETHISwave.co.nz> wrote in message
news:bn**********@news.wave.co.nz...
There are 2 solutions here. The first would be include a field in the
recordset that stores the value of your first combo box. The second would be to include code in the On Current Event procedure for your form that looks
at the stored value of the second combo box and displays the correct value
of the first combo box. e.g. using the row sources given
If Not IsNull(Me!ctlAgency.Column(1)) Then
Me!ctlType = Me!ctlAgency.Colomn(1)
End If
"Heather" <he*********@optusnet.com.au> wrote in message
news:9a**************************@posting.google.c om...
Hi

I am desparately looking for advice in relation to storing the results
after selecting items from two combo boxes on a Referral form. The
first combo box 'ctl Type' displays a full list of Agency Types, then
the 2nd combo box displays a list of Organisations, depending upon the
Agency Type Selected.

The first combo box 'ctlType' (Unbound), Row Source: to field
[OrganisationType] in 'AgencyReferralType'.

The second combo box 'ctlAgency', Row Source: to
[AgencyNameid],[organisationtype],[AgencyName] in 'qryAgencyType'
I have set the criteria for this [organisationtype]to
[forms]![frmreferralto]![ctltype].

The first combo displays the correct sub-list in combo 2 but the
values are empty when the form is re-opened.

Can anyone please provide any feedback as to what I am doing wrong.

Many Many Thanks.


Nov 12 '05 #5

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

Similar topics

4
by: Yuk Cheng | last post by:
<<<start index.htm>>> <html> <head> <script> function perform(action){ } </script> </head>
1
by: dskillingstad | last post by:
Would appreciate any help I could get I have an unbound search form with various text boxes on it for searching my database. I would like to have a combo box on the search form where the source...
3
by: Mindy | last post by:
Does anyone know the difference between Navigational and Lookup features of combo boxes? I wondered if there were difference between these two if we selecte "remember the value for later use" when...
1
by: lawton | last post by:
Source: this is an access 2003 question My knowledge level: reading books, internet, and trial & error; no formal training I'm trying to get a running sum of what's filtered in a subform which is...
4
by: Dave | last post by:
I wasn't sure how to search for previous posts about this, it felt real specific. Ok so here's the database & problem: I have 4 combo boxes: cboServer, cboPolicy, cboDB, and cboApplication. ...
2
by: gayano | last post by:
Hi, Again, This one is a tricky One,, I have a Form includes ... Start Date - Text Box Start Time - Text Box End Date - Text Box End Time - Text Box
3
by: WiscCard | last post by:
This seems simple enough, but I am having problems. I have a table of customer information. I have a form with various combo boxes displaying unique customer information (in this case, zone and...
0
by: dudeja.rajat | last post by:
On Sat, Aug 30, 2008 at 2:32 PM, Fredrik Lundh <fredrik@pythonware.comwrote: Fredrik, Thanks so much. That worked. Following this, I can now see that my combo2 has no previous elements and...
0
by: Del | last post by:
Hello and thanks for any and all assistance! I have a database that is used by several users on several different machines. The backend database is housed on a file server. Each user has a...
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...
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
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,...
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
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,...
0
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...

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.