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

Automatically populate fields for related records

Hello Everyboy

I am creating a small scale db with following fields in the table and
form for the data entry purpose.

Product ID Product Name Manufacturer
Location

101 Pen ABC & Co.
Boston
102 Rulers XYZ & Co.
Chicago

For the next new record, when the user enters the product id as 101,
the form should automatically populate Pen, ABC & Co., Boston as
respective values for the rest of the field controls in the form. And
as the field controls in the form are populated, the corresponding
fields in the table should also be populated.
I would really appreciate if somebody can explain me to solve this. I
am using Windows 2000 professional with Access 2003.

Thanks in advance

Chand
Nov 13 '05 #1
2 5348
ch**********@yahoo.com (Chand) wrote in message news:<cd**************************@posting.google. com>...
Hello Everyboy

I am creating a small scale db with following fields in the table and
form for the data entry purpose.

Product ID Product Name Manufacturer
Location

101 Pen ABC & Co.
Boston
102 Rulers XYZ & Co.
Chicago

For the next new record, when the user enters the product id as 101,
the form should automatically populate Pen, ABC & Co., Boston as
respective values for the rest of the field controls in the form. And
as the field controls in the form are populated, the corresponding
fields in the table should also be populated.
I would really appreciate if somebody can explain me to solve this. I
am using Windows 2000 professional with Access 2003.

Thanks in advance

Chand

make the product ID field a combobox with 4 columns {Product ID,
Product Name, Manufacturer, Location} Show the first/second (or
whichever you want). then set the values for the other textboxes
=Me!cboProductID.Column(1)...
No need to populate the table with all that stuff if it's already in
the products table. You can query for it as you need it.
Nov 13 '05 #2
ch**********@yahoo.com (Chand) wrote in message news:<cd**************************@posting.google. com>...
Hello Everyboy

I am creating a small scale db with following fields in the table and
form for the data entry purpose.

Product ID Product Name Manufacturer
Location

101 Pen ABC & Co.
Boston
102 Rulers XYZ & Co.
Chicago

For the next new record, when the user enters the product id as 101,
the form should automatically populate Pen, ABC & Co., Boston as
respective values for the rest of the field controls in the form. And
as the field controls in the form are populated, the corresponding
fields in the table should also be populated.
I would really appreciate if somebody can explain me to solve this. I
am using Windows 2000 professional with Access 2003.


Chand,
this is a trick question. The answer is that you only write the
related foreign key into your table. then you use a query to retrieve
the rest of the data when you need it. You can either use DLookup or
use a combobox with lots of hidden columns and then reference the
hidden columns in your UNbound (yes, you read that right - unbound)
controls. the rowsource is something like (off the top of my head)
=Me!MyCombo.Columns(1) and remember that columns are zero-based, not
one-based, so subtract from the ordinal position...
HTH,
Pieter
Nov 13 '05 #3

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

Similar topics

0
by: BK | last post by:
Hi, I have a problem. I need to auto populate fields based on a value entered in combo box. Initially, I put all the required fields in the combo box, and hide it (set to 0",0",0", ...), then...
2
by: Miguelito Bain | last post by:
hi everyone- i inheritrd a database that wasn't designed very well. i'm trying to decide whether or not it is a good idea to add at least 8 more fields to a table that already has existing...
2
by: Cro | last post by:
Dear Access Developers, I am developing a form with 'default view' set to "continuous forms". I am suffering with a problem I can't yet see a solution too. Each record has many fields. Two...
11
by: DSR | last post by:
Help Please... I would like to populate a combo box on a form with a query that compares data from two tables. Any record that is unique in table1 should continue to populate my combobox. The...
5
by: Rich | last post by:
Hello, I have a search application to search data in tables in a database (3 sql server tables). I populate 2 comboboxes with with data from each table. One combobox will contain unique...
13
by: Mary | last post by:
I'll pulling my hair out on this one and would be so appreciative of any help. I am creating a data entry form to enter results of a student survey. There are 40 questions on the survey. The...
3
MattFitzgerald
by: MattFitzgerald | last post by:
My Forms & Tables:- Main form is Frm_LE_List (contains Customer Details) Stored in Tbl_LE_List Which contains subform Frm_VOL_References (Contains Orders known as VOL's) Stored in...
1
by: ramel | last post by:
Hi all, I have a problem related to javascript , ajax and jsp. Please see this url http://xil.co.in/print_screen_2.JPG. I am working on this form. There are some buttons (like submit ,...
3
by: Sharkiness | last post by:
Good Afternoon, I would like some help on creating some code on my forms Load function so that when a user opens it they will automatically have only their allocated records available for viewing....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
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
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...

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.