472,328 Members | 1,141 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 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 4146
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...
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...
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...
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:...
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...
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...
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...
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...
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.