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

Auto-populate second table based on combobox selection

I hope somebody can help. I can't get into the specifics of my
project, but I'll try to create a simple example:

tblVehicle

* VIN (text box)
* Make (text box)
* Model (text box)

frmRepair

* VIN (cboVIN)
* Make (text box)
* Model (text box)
* Problem (text box)
* Fix (text box)
* Date (date)

tblRepair

* VIN (text box)
* Make (text box)
* Model (text box)
* Problem (text box)
* Fix (text box)
* Date (date)
All of the records in tblVehicle are unique. VIN is the Primary Key.
It has a one-to-many relationship to tblRepair.

frmRepair is to record every time a repair is made to a vehicle
identified in tblVehicle. I have cboVIN set up to select from all of
the records in tblVehicle. This selection is then populated in
tblRepair.

I also want to auto-populate Make and Model in tblRepair. Not just
display them in the form (which I can do), but store the data in the
second table.

Yes, I know that I shouldn't have repeating information in multiple
tables. However, I have reasons for doing so. I have a totally
different software application that would utilize the resulting data
in
tblRepair.

So ... I want to use frmRepair to select the VIN from tblVehicle, and
auto-populate VIN, Make, and Model in tblRepair. VIN works
automatically,
but I don't know what to do for Make and Model.

I apologize if this type of issue has been answered before. I've
tried searching
the news groups and haven't found exactly what I am looking for.

Thanks.

- Ronald
Jun 27 '08 #1
2 3301
Set the combo box data source as VIN, Make and Model (you can
hide the Make and Model by setting the width of column 1 and 2
(it's zero based) to 0). When you make your selection in the combo
box assign the other two values to the text boxes
eg ME!txtMake = Me!cboVIN.column(1).

Regards
Kevin

"Ronald" <rn*****@starpower.netwrote in message
news:38**********************************@m3g2000h sc.googlegroups.com...
>I hope somebody can help. I can't get into the specifics of my
project, but I'll try to create a simple example:

tblVehicle

* VIN (text box)
* Make (text box)
* Model (text box)

frmRepair

* VIN (cboVIN)
* Make (text box)
* Model (text box)
* Problem (text box)
* Fix (text box)
* Date (date)

tblRepair

* VIN (text box)
* Make (text box)
* Model (text box)
* Problem (text box)
* Fix (text box)
* Date (date)
All of the records in tblVehicle are unique. VIN is the Primary Key.
It has a one-to-many relationship to tblRepair.

frmRepair is to record every time a repair is made to a vehicle
identified in tblVehicle. I have cboVIN set up to select from all of
the records in tblVehicle. This selection is then populated in
tblRepair.

I also want to auto-populate Make and Model in tblRepair. Not just
display them in the form (which I can do), but store the data in the
second table.

Yes, I know that I shouldn't have repeating information in multiple
tables. However, I have reasons for doing so. I have a totally
different software application that would utilize the resulting data
in
tblRepair.

So ... I want to use frmRepair to select the VIN from tblVehicle, and
auto-populate VIN, Make, and Model in tblRepair. VIN works
automatically,
but I don't know what to do for Make and Model.

I apologize if this type of issue has been answered before. I've
tried searching
the news groups and haven't found exactly what I am looking for.

Thanks.

- Ronald

Jun 27 '08 #2

Thank you very much! I have it working.

- Ronald
Jun 27 '08 #3

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

Similar topics

1
by: Lew | last post by:
Hi all, I'm trying to create a page that has a user-selectable page auto-refresh option (IE 5.5). Essentially, it's a page that contains a checkbox, when the user checks the checkbox, I'd like...
1
by: Glabbeek | last post by:
I'm changing the layout of my site. Instead of using tables, I will use DIVs. It's working fine, except for 1 thing: In IE6 some DIVs are not the correct width. Mozilla and Opera are showing the...
5
by: Robert Downes | last post by:
I'm using the following in a page that I'm testing in Mozilla: p.actionLinkBlock {border: 1px #000000 dashed; padding: 0.2cm; width: auto} But the dashed border is extending to the right-edge...
9
by: Alan Mackenzie | last post by:
To all those who use (X)Emacs's CC Mode to edit C, C++, Java, Objective-C, Pike, AWK or IDL: To help direct the development of CC Mode, it would be useful to find out how people use the...
20
by: Vijay Kumar R. Zanvar | last post by:
Hello, Unlike register, auto keyword can not be used to declare formal parameter(s). Is there any specific reason for this? Kind regards, Vijay Kumar R. Zanvar
2
by: VB Programmer | last post by:
I created a page which I am using to prevent the user from hitting the BACK button. I'll call it my "Auto Jump" page. When it is called it basically auto-redirects to a page specified in the...
5
by: maya | last post by:
at work they decided to center divs thus: body {text-align:center} #content {width: 612px; text-align:left; margin: 0 auto 0 auto; } this works fine in IE & FF, EXCEPT in FF it doesn't work if...
22
by: nospam_news | last post by:
I currently get asked about my usage of "auto". What is it for? The keyword is clearly superflous here. In contrast to the huge majority of C/C++ developers I write definitions very explicitly...
2
by: Piotr K | last post by:
Hi, I've encountered a strange problem with Firefox which I don't have any idea how to resolve. To the point: I've <divelement with a style "height: auto" and I want to retrieve this value...
21
by: JOYCE | last post by:
Look the subject,that's my problem! I hope someone can help me, thanks
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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...

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.