473,416 Members | 1,564 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.

updating subform via selection of combo boxes

I want to put the information that the user selects in my combo boxes
into a subform that lies on the same form as the combo boxes.

Thanks for your help already,
Dave

Jul 16 '07 #1
6 3659
On Jul 16, 4:19 pm, Dave <djwest...@gmail.comwrote:
I want to put the information that the user selects in my combo boxes
into a subform that lies on the same form as the combo boxes.

Thanks for your help already,
Dave
So here's the problem:
I don't know how to update my subform with information stored in a
table but is selected in any or all of 4 combo boxes.

Thanks again,
Dave

Jul 16 '07 #2

"Dave" <dj*******@gmail.comwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...
On Jul 16, 4:19 pm, Dave <djwest...@gmail.comwrote:
>I want to put the information that the user selects in my combo boxes
into a subform that lies on the same form as the combo boxes.

Thanks for your help already,
Dave

So here's the problem:
I don't know how to update my subform with information stored in a
table but is selected in any or all of 4 combo boxes.

Thanks again,
Dave
If I understand correctly, you want to select information in Combo Boxes on
a main Form and update the Form embedded in a Subform Control on that same
main Form. For simplicity, let's assume the names of the Combo Boxes are
cboA, cboB, cboC, and cboD and the corresponding Text Boxes on the Form
embedded in the Subform Control are txtA, txtB, txtC, and txtD. Further,
assume that the Subform Control is named sbfX. For our purposes, the name of
the embedded Form in that Subform Control is immaterial.

To update each Text Box in the Form embedded in the Subform Control as soon
as the selection is made in the corresponding Combo Box, in the AfterUpdate
event of cboA, use the statement Me!sbfX.Form!txtA = Me!cboA; in the
AfterUpdate event of cboB, use the statement Me!sbfX.Form!txtB = Me!cboB; in
the AfterUpdate event of cboC, use the statement Me!sbfX.Form!txtC =
Me!cboC; and in the AfterUpdate event of cboD, use the statement
Me!sbfX.Form!txtD = Me!cboD.

If, on the other hand, you want to wait until the user has reviewed his
selections and then update, put all the statements in the Click Event of a
cmdDoIt command button, to wit:

Me!sbfX.Form!txtA = Me!cboA
Me!sbfX.Form!txtB = Me!cboB
Me!sbfX.Form!txtC = Me!cboC
Me!sbfX.Form!txtD = Me!cboD.

If I were going to do the latter, I would examine the requirements to
determine if the updates were to be done regardless of updates to or
selection of data in the Combo Boxes and add code to assure the required
conditions had been met.

Larry Linson
Microsoft Access MVP
Jul 16 '07 #3
On Jul 16, 6:30 pm, "Larry Linson" <boun...@localhost.notwrote:
"Dave" <djwest...@gmail.comwrote in message

news:11**********************@k79g2000hse.googlegr oups.com...
On Jul 16, 4:19 pm, Dave <djwest...@gmail.comwrote:
I want to put the information that the user selects in my combo boxes
into a subform that lies on the same form as the combo boxes.
Thanks for your help already,
Dave
So here's the problem:
I don't know how to update my subform with information stored in a
table but is selected in any or all of 4 combo boxes.
Thanks again,
Dave

If I understand correctly, you want to select information in Combo Boxes on
a main Form and update the Form embedded in a Subform Control on that same
main Form. For simplicity, let's assume the names of the Combo Boxes are
cboA, cboB, cboC, and cboD and the corresponding Text Boxes on the Form
embedded in the Subform Control are txtA, txtB, txtC, and txtD. Further,
assume that the Subform Control is named sbfX. For our purposes, the name of
the embedded Form in that Subform Control is immaterial.

To update each Text Box in the Form embedded in the Subform Control as soon
as the selection is made in the corresponding Combo Box, in the AfterUpdate
event of cboA, use the statement Me!sbfX.Form!txtA = Me!cboA; in the
AfterUpdate event of cboB, use the statement Me!sbfX.Form!txtB = Me!cboB; in
the AfterUpdate event of cboC, use the statement Me!sbfX.Form!txtC =
Me!cboC; and in the AfterUpdate event of cboD, use the statement
Me!sbfX.Form!txtD = Me!cboD.

If, on the other hand, you want to wait until the user has reviewed his
selections and then update, put all the statements in the Click Event of a
cmdDoIt command button, to wit:

Me!sbfX.Form!txtA = Me!cboA
Me!sbfX.Form!txtB = Me!cboB
Me!sbfX.Form!txtC = Me!cboC
Me!sbfX.Form!txtD = Me!cboD.

If I were going to do the latter, I would examine the requirements to
determine if the updates were to be done regardless of updates to or
selection of data in the Combo Boxes and add code to assure the required
conditions had been met.

Larry Linson
Microsoft Access MVP
Larry,

My apologies for the lack of clarity. Thank you for your response.

Let me be more specific...

I have a main form (DR Form) with 4 combo boxes (ie cbo1, cbo2, etc)
and a subdatasheet (the subform...let's call it subInfo) below the
combo boxes on the DR Form. I hope this clears up confusion of the
interface we are working with.

The 4 combo boxes have pre-populated criteria that update each other
depending on selections of the combo boxes. For example, user selects
the name Dave from cbo1. The other 3 combo boxes are now updated to
Dave's Address, Contact Info, and State of Birthplace (cbo2, cbo3,
cbo4, respectively). So now that the user has selected Dave as a
name, the other 3 combo boxes are now auto-updated with some of Dave's
personal information (these pieces of information are stored in
separate but linked tables).

With this process of auto-updating the combo boxes using SQL Select
statement in the afterupdate sub procedure of the combo boxes, I am
now wanting the criteria of combo boxes to be displayed with the rest
of the information tied to the name Dave (pulling this info straight
from a table) in subInfo. And even when some of the combo boxes
aren't selected I'd want all choices of the unselected combo box(es)
tied to the name Dave to be put in the subInfo. The subInfo layout
should be like a spreadsheet or like a table in Access.

I hope this is clear enough and is understood. Thank you in advance!

Dave

And I'm thinking some of this can be done in the subInfo by specifying
the column I want the data to be put in? It's above my head.

Jul 17 '07 #4
On Jul 16, 6:30 pm, "Larry Linson" <boun...@localhost.notwrote:
"Dave" <djwest...@gmail.comwrote in message

news:11**********************@k79g2000hse.googlegr oups.com...
On Jul 16, 4:19 pm, Dave <djwest...@gmail.comwrote:
I want to put the information that the user selects in my combo boxes
into a subform that lies on the same form as the combo boxes.
Thanks for your help already,
Dave
So here's the problem:
I don't know how to update my subform with information stored in a
table but is selected in any or all of 4 combo boxes.
Thanks again,
Dave

If I understand correctly, you want to select information in Combo Boxes on
a main Form and update the Form embedded in a Subform Control on that same
main Form. For simplicity, let's assume the names of the Combo Boxes are
cboA, cboB, cboC, and cboD and the corresponding Text Boxes on the Form
embedded in the Subform Control are txtA, txtB, txtC, and txtD. Further,
assume that the Subform Control is named sbfX. For our purposes, the name of
the embedded Form in that Subform Control is immaterial.

To update each Text Box in the Form embedded in the Subform Control as soon
as the selection is made in the corresponding Combo Box, in the AfterUpdate
event of cboA, use the statement Me!sbfX.Form!txtA = Me!cboA; in the
AfterUpdate event of cboB, use the statement Me!sbfX.Form!txtB = Me!cboB; in
the AfterUpdate event of cboC, use the statement Me!sbfX.Form!txtC =
Me!cboC; and in the AfterUpdate event of cboD, use the statement
Me!sbfX.Form!txtD = Me!cboD.

If, on the other hand, you want to wait until the user has reviewed his
selections and then update, put all the statements in the Click Event of a
cmdDoIt command button, to wit:

Me!sbfX.Form!txtA = Me!cboA
Me!sbfX.Form!txtB = Me!cboB
Me!sbfX.Form!txtC = Me!cboC
Me!sbfX.Form!txtD = Me!cboD.

If I were going to do the latter, I would examine the requirements to
determine if the updates were to be done regardless of updates to or
selection of data in the Combo Boxes and add code to assure the required
conditions had been met.

Larry Linson
Microsoft Access MVP
Larry,

My apologies for the lack of clarity. Thank you for your response.

Let me be more specific...

I have a main form (DR Form) with 4 combo boxes (ie cbo1, cbo2, etc)
and a subdatasheet (the subform...let's call it subInfo) below the
combo boxes on the DR Form. I hope this clears up confusion of the
interface we are working with.

The 4 combo boxes have pre-populated criteria that update each other
depending on selections of the combo boxes. For example, user selects
the name Dave from cbo1. The other 3 combo boxes are now updated to
Dave's Address, Contact Info, and State of Birthplace (cbo2, cbo3,
cbo4, respectively). So now that the user has selected Dave as a
name, the other 3 combo boxes are now auto-updated with some of Dave's
personal information (these pieces of information are stored in
separate but linked tables).

With this process of auto-updating the combo boxes using SQL Select
statement in the afterupdate sub procedure of the combo boxes, I am
now wanting the criteria of combo boxes to be displayed with the rest
of the information tied to the name Dave (pulling this info straight
from a table) in subInfo. And even when some of the combo boxes
aren't selected I'd want all choices of the unselected combo box(es)
tied to the name Dave to be put in the subInfo. The subInfo layout
should be like a spreadsheet or like a table in Access.

I hope this is clear enough and is understood. Thank you in advance!

Dave

And I'm thinking some of this can be done in the subInfo by specifying
the column I want the data to be put in? It's above my head.

Jul 17 '07 #5
On Jul 16, 6:30 pm, "Larry Linson" <boun...@localhost.notwrote:
"Dave" <djwest...@gmail.comwrote in message

news:11**********************@k79g2000hse.googlegr oups.com...
On Jul 16, 4:19 pm, Dave <djwest...@gmail.comwrote:
I want to put the information that the user selects in my combo boxes
into a subform that lies on the same form as the combo boxes.
Thanks for your help already,
Dave
So here's the problem:
I don't know how to update my subform with information stored in a
table but is selected in any or all of 4 combo boxes.
Thanks again,
Dave

If I understand correctly, you want to select information in Combo Boxes on
a main Form and update the Form embedded in a Subform Control on that same
main Form. For simplicity, let's assume the names of the Combo Boxes are
cboA, cboB, cboC, and cboD and the corresponding Text Boxes on the Form
embedded in the Subform Control are txtA, txtB, txtC, and txtD. Further,
assume that the Subform Control is named sbfX. For our purposes, the name of
the embedded Form in that Subform Control is immaterial.

To update each Text Box in the Form embedded in the Subform Control as soon
as the selection is made in the corresponding Combo Box, in the AfterUpdate
event of cboA, use the statement Me!sbfX.Form!txtA = Me!cboA; in the
AfterUpdate event of cboB, use the statement Me!sbfX.Form!txtB = Me!cboB; in
the AfterUpdate event of cboC, use the statement Me!sbfX.Form!txtC =
Me!cboC; and in the AfterUpdate event of cboD, use the statement
Me!sbfX.Form!txtD = Me!cboD.

If, on the other hand, you want to wait until the user has reviewed his
selections and then update, put all the statements in the Click Event of a
cmdDoIt command button, to wit:

Me!sbfX.Form!txtA = Me!cboA
Me!sbfX.Form!txtB = Me!cboB
Me!sbfX.Form!txtC = Me!cboC
Me!sbfX.Form!txtD = Me!cboD.

If I were going to do the latter, I would examine the requirements to
determine if the updates were to be done regardless of updates to or
selection of data in the Combo Boxes and add code to assure the required
conditions had been met.

Larry Linson
Microsoft Access MVP

Larry - My apologies for the lack of clarity. Thank you for your
response.

Let me be more specific...

I have a main form (RD Form) with 4 combo boxes (i.e. cbo1, cbo2, etc)
and a subdatasheet (the subform...let's call it subInfo) below the
combo
boxes on the RD Form. I hope this clears up confusion of the
interface
we are working with.

The 4 combo boxes have pre-populated criteria that update each other
depending on selections of the combo boxes. For example, user selects
the name Dave from cbo1. The other 3 combo boxes are now updated to
Dave's Address, Contact Info, and State of Birthplace (cbo2, cbo3,
cbo4,
respectively). So now that the user has selected Dave as a name, the
other 3 combo boxes are now auto-updated with some of Dave's personal
information (these pieces of information are stored in separate but
linked tables).

With this process of auto-updating the combo boxes using SQL Select
statements in the afterupdate sub procedure of the combo boxes, I am
now
wanting the criteria of combo boxes to be displayed with the rest of
the
information tied to the name Dave (pulling this info straight from a
table) in subInfo. And even when some of the combo boxes aren't
selected I'd want all choices of the unselected combo box(es) that are
tied to the name Dave to be put in the subInfo. The subInfo layout
should be like a spreadsheet or like a table in Access.

I hope this is clear enough and is understood. Thank you in advance!

Dave

And I'm thinking some of this can be done in the subInfo by specifying
the column I want the data to be put in? This is a bit above my head.

Jul 17 '07 #6
On Jul 16, 6:30 pm, "Larry Linson" <boun...@localhost.notwrote:
"Dave" <djwest...@gmail.comwrote in message

news:11**********************@k79g2000hse.googlegr oups.com...
On Jul 16, 4:19 pm, Dave <djwest...@gmail.comwrote:
I want to put the information that the user selects in my combo boxes
into a subform that lies on the same form as the combo boxes.
Thanks for your help already,
Dave
So here's the problem:
I don't know how to update my subform with information stored in a
table but is selected in any or all of 4 combo boxes.
Thanks again,
Dave

If I understand correctly, you want to select information in Combo Boxes on
a main Form and update the Form embedded in a Subform Control on that same
main Form. For simplicity, let's assume the names of the Combo Boxes are
cboA, cboB, cboC, and cboD and the corresponding Text Boxes on the Form
embedded in the Subform Control are txtA, txtB, txtC, and txtD. Further,
assume that the Subform Control is named sbfX. For our purposes, the name of
the embedded Form in that Subform Control is immaterial.

To update each Text Box in the Form embedded in the Subform Control as soon
as the selection is made in the corresponding Combo Box, in the AfterUpdate
event of cboA, use the statement Me!sbfX.Form!txtA = Me!cboA; in the
AfterUpdate event of cboB, use the statement Me!sbfX.Form!txtB = Me!cboB; in
the AfterUpdate event of cboC, use the statement Me!sbfX.Form!txtC =
Me!cboC; and in the AfterUpdate event of cboD, use the statement
Me!sbfX.Form!txtD = Me!cboD.

If, on the other hand, you want to wait until the user has reviewed his
selections and then update, put all the statements in the Click Event of a
cmdDoIt command button, to wit:

Me!sbfX.Form!txtA = Me!cboA
Me!sbfX.Form!txtB = Me!cboB
Me!sbfX.Form!txtC = Me!cboC
Me!sbfX.Form!txtD = Me!cboD.

If I were going to do the latter, I would examine the requirements to
determine if the updates were to be done regardless of updates to or
selection of data in the Combo Boxes and add code to assure the required
conditions had been met.

Larry Linson
Microsoft Access MVP
Larry - My apologies for the lack of clarity. Thank you for your
response.

Let me be more specific...

I have a main form (RD Form) with 4 combo boxes (i.e. cbo1, cbo2, etc)
and a subdatasheet (the subform...let's call it subInfo) below the
combo boxes on the RD Form. I hope this clears up confusion of the
interface we are working with.

The 4 combo boxes have pre-populated criteria that update each other
depending on selections of the combo boxes. For example, user selects
the name Dave from cbo1. The other 3 combo boxes are now updated to
Dave's Address, Contact Info, and State of Birthplace (cbo2, cbo3,
cbo4, respectively). So now that the user has selected Dave as a
name, the other 3 combo boxes are now auto-updated with some of Dave's
personal information (these pieces of information are stored in
separate but linked tables).

With this process of auto-updating the combo boxes using SQL Select
statements in the afterupdate sub procedure of the combo boxes, I am
now wanting the criteria of combo boxes to be displayed with the rest
of the information tied to the name Dave (pulling this info straight
from a table) in subInfo. And even when some of the combo boxes
aren't selected I'd want all choices of the unselected combo box(es)
that are tied to the name Dave to be put in the subInfo. The subInfo
layout should be like a spreadsheet or like a table in Access.

And I'm thinking some of this can be done in the subInfo by specifying
the column I want the data to be put in?

I hope this is clear enough and is understood. Thank you in advance!

Dave

Jul 18 '07 #7

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

Similar topics

2
by: Cameron | last post by:
Hi, For the database I am currently working on, my employer would like the ability to use multiple combo boxes in order to filter the database. For instance the structure of the company is based...
4
by: CSDunn | last post by:
Hello, I have a combo box (Combo7) that needs to call a function during the After Update event of the combo box. The function resides in an Access 2000 ADP Module called MMAnswerData_code. The...
0
by: CSDunn | last post by:
Hello, In Access ADP's that connect to SQL Server databases, any time I have a situation where I have a combo box in a main form that looks up a record in a subform, the subform record source has...
1
by: jerry.ranch | last post by:
So I've been playing with combo boxes and subforms. Finally, I can make a selection in a combo box, and have that drive an after update event to open a query or a form. Works famously. Now the...
1
by: MLH | last post by:
I have a form with a subform control on it listing records returned by a saved query named UnbilledVehicles. I would like to put command buttons on the main form to apply dynamic filters to the...
9
by: natwong | last post by:
Hi All, I'm a newbie in terms of Access and some of its functionality . I've been stuck on this problem for a couple days, even after searching the Web, etc. Currently I have five combo boxes...
2
by: docsix | last post by:
I am having trouble populating a combo box in a subform. Currently I have two combo boxes on a single form that works. This is my current setup: Table:Facilities - FacilityID ... FacilityType 1...
4
by: Macbane | last post by:
Hi, I have a 'main' form called frmIssues which has a subform control (named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs. A control button on the main form opens a pop-up form...
9
by: Marianne160 | last post by:
Hi, I know there are various answers to this problem available on the web but none of them seem to work for me. I am using Access 2003 to make a form to look up data from a table. I have so far...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.