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

Home Posts Topics Members FAQ

Combo Box Populating Multiple Text Boxes

5 New Member
Hi everyone. I need help. I have a combo box in my form that i want to populate multiple text boxes after you select your selection in the combo box. Here is my set up.

The Fields that need to be populated are lsited below but must be recorded to a new table. Gets info from Course occurance Table.

Combo Box - Gets Information from Course Occurance Table. This table has all information regarding course information.

Course ID:
Course Name:
Hours:
End Date:

So after the selection is made from combo box. It populates these fields. Combo box gets info from course occurance table. The fields on the form are linked to the grades table on my data base. I want the info pulled from course occurance table then populate it in these fields . Which will then be recorded to the Grades Table. I have the combo box working just i cant figure out how to populate the fields. Please Help.

Sincerely,
Ray Z
Jul 10 '07 #1
6 8264
zuchowra
5 New Member
Im using Access 2007. Please Help!
Jul 10 '07 #2
puppydogbuddy
1,923 Recognized Expert Top Contributor
Im using Access 2007. Please Help!
If I understood correctly, you would use the AfterUpdate event of your combo to update the textboxes as shown below. Replace the generic names I used for your textboxes and your combo box with the actual names used in your application.
Expand|Select|Wrap|Line Numbers
  1. Private Sub YourCombo_AfterUpdate
  2.  
  3. If Not IsNull(Me!YourCombo) Then
  4.      Me!txtCourseID.Value  = Me!YourCombo.Column(0)
  5.      Me!txtCourseName.Value = Me!YourCombo.Column(1)
  6.      Me!txtCourseHours.Value = Me!YourCombo.Column(2)
  7.      Me!txtEndDate.Value = Me!YourCombo.Column(3)
  8.      Me.Requery
  9. End If
  10. End Sub
  11.  
Jul 10 '07 #3
zuchowra
5 New Member
Thanks. You are the Best. I appreciate it.
Jul 10 '07 #4
deedeem
4 New Member
Thanks. You are the Best. I appreciate it.
By the way, I am having the same problem. My combo box has two fields from an underlying query called MMS and Rev. I want to requery the form based on these two values and only know how to do this for one value. My combo box has a name of Combo14 and I don't know how to refer to the values separately if you know what I mean. My code looks like this and worked when I just queried based on the MMS. When I decided I needed to query based on both MMS and Rev I got lost.

Private Sub Combo14_AfterUp date()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Cl one
rs.FindFirst "[MMSCode] = '" & Me![Combo14] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Help. By the way, how do I get the answer to this question. I tried posting a question before and still have not figured out how to go see if someone answered it.

Thanks so much,
DeeDee
Jul 18 '07 #5
puppydogbuddy
1,923 Recognized Expert Top Contributor
By the way, I am having the same problem. My combo box has two fields from an underlying query called MMS and Rev. I want to requery the form based on these two values and only know how to do this for one value. My combo box has a name of Combo14 and I don't know how to refer to the values separately if you know what I mean. My code looks like this and worked when I just queried based on the MMS. When I decided I needed to query based on both MMS and Rev I got lost.

Private Sub Combo14_AfterUp date()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Cl one
rs.FindFirst "[MMSCode] = '" & Me![Combo14] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Help. By the way, how do I get the answer to this question. I tried posting a question before and still have not figured out how to go see if someone answered it.

Thanks so much,
DeeDee
DeeDee,
If you click the hyperlink to your profile in upper left, you will see links to all your previous posts and threads. In regard to the problem with your combo, I need a little more info........... ...see below:
1. what are MMS and Rev ? what is the primary key to your table(s) that have MMS and Rev in them.
2. show me a one line sample of what the data looks like.
Jul 18 '07 #6
deedeem
4 New Member
Thanks so much for your time. I just figured out how to get to the answers to my posts!!! Ha Ha.
I did get the answer to this problem. You use the .column() subscript to refer to each element in the combo box.

Now I can look for answers to my posts. I appreciate your help.
I'm new so forgive me.
DeeDee


DeeDee,
If you click the hyperlink to your profile in upper left, you will see links to all your previous posts and threads. In regard to the problem with your combo, I need a little more info........... ...see below:
1. what are MMS and Rev ? what is the primary key to your table(s) that have MMS and Rev in them.
2. show me a one line sample of what the data looks like.
Jul 27 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3721
by: Daniel Hill | last post by:
OK, I have very, VERY basic background knowledge of VB6 and have now upgraded to VB.NET and now I'm struggling to bring up the forms I want. What I am looking to do is to have a click a command button bring up a form, and to have which form is brought up determined by which item is selected in the accompanying combo box. I've gathered that you have to declare the item as a
7
4071
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
3
4304
by: vgrssrtrs | last post by:
<html> <head> <script language="JavaScript"> <!-- /* *** Multiple dynamic combo boxes *** by Mirko Elviro, 9 Mar 2005 *** ***Please do not remove this comment
2
3058
by: visionstate | last post by:
Hi there, I am working on a form that uses 3 text boxes and 3 combo boxes. When any data is entered into any of these, I click a command button and this requeries a sub query in the form and displays data dependent on what has been typed in. After having trouble with populating my second combo box (I eventually populated it by putting the fields for both combo boxes in 1 separate query) I am now having problems with the 3rd one and am...
1
2567
by: Shawn Yates | last post by:
It has been a while since I have done anything on MS Access and I seem to be a bit rusty. I hope someone could help me solve my issue. I have a form that has multiple combo boxes on it. Each box has 4 possible answers to a question. Each of the 4 possible answers is also assigned a value: answer 1 is worth 1 point, answer 2 is worth 2 points.... What I need to do now is add togethor the points of all the combo boxes. So far I have given...
2
3267
by: Dave | last post by:
I have 3 tables of information feeding into 4 combo boxes on my main form (DR Form). I have as many list boxes (acting as text boxes) as there are fields in each one of the 3 tables. Once selecting from the combo box, I have all the combo boxes, using afterupdate, populating their respective list boxes. These text boxes are directly correlated to the combo box selection using SQL. Here is an example from the afterupdate event in the...
2
2280
by: SPOILED36 | last post by:
I am building a database to track attendance. I have one main form with multiple subforms. Within one of the subforms name sfrDailyAttendance, I also have cascading combo boxes (cboCategory and cboException) to filter difference absences (ie.Regular, Overtime, etc). cboCategory is filtered as follows: !!... Because I have the subform set up as a continuous form, I needed to add a text box (txtException) on top of one of the combo boxes...
2
4606
by: SHAWTY721 | last post by:
I have a form that contains two combo boxes that are related to each other. I need to find a way to populate my text box based on the criteria of the two combo boxes so the appropriate number appears in the text box.
0
8312
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
8827
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
8732
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...
1
8504
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,...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7337
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4159
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...
1
2732
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
1622
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.