473,320 Members | 2,003 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,320 software developers and data experts.

Pre populating informatin in a form

In my form header I have fields for Employee Name, Employee ID #, Vehicle
Type, Vehicle #, Classification, etc. I want to be able to click the drop
down list and select the employee name. After the emloyee name is selected I
would like all of the other fields to pre populate with that employee's info.
Do I need two different tables with a unique Identifier for each employee
with some sort of validation process through a query? Is that completely
wrong and there is some other way to do this? Any suggestions would be
greatly appreciated.

--
Message posted via http://www.accessmonster.com

Feb 8 '07 #1
2 3345
On Feb 8, 2:59 pm, "Volatol via AccessMonster.com" <u30824@uwewrote:
In my form header I have fields for Employee Name, Employee ID #, Vehicle
Type, Vehicle #, Classification, etc. I want to be able to click the drop
down list and select the employee name. After the emloyee name is selected I
would like all of the other fields to pre populate with that employee's info.
Do I need two different tables with a unique Identifier for each employee
with some sort of validation process through a query? Is that completely
wrong and there is some other way to do this? Any suggestions would be
greatly appreciated.

--
Message posted viahttp://www.accessmonster.com
If you can get all the data from a single table or a query, then you
could use that table/query as the rowsource for your combobox and just
hide all the other columns by setting their widths to 0. then you
could just set the controlsource for each of the textboxes to
=cboEmployee.Columns(n) where n is a number starting at _zero_. (Just
subtract one from the ordinal position).

For example, if you wanted to see the employee's First name in a
textbox, and the rowsource for the combobox is something like
"SELECT [Employee ID], [Employee Name], [Vehicle Type], [VehicleID],
[Classification]
FROM Employee
WHERE...
ORDER BY [Employee Name];"

Then you'd set all the hidden columns (0,2,3,4) to zero in the Column
Widths property {0;1;0;0;0}, and then in your form, you would put your
textboxes and then just set the rowsource to cboEmployee.Columns(2)
for Employee Name. If you test it out with a couple of numbers,
you'll get it pretty quickly.

HTH,
Pieter

Feb 8 '07 #2

"Volatol via AccessMonster.com" <u30824@uwewrote in message
news:6d83e4a9f9d7d@uwe...
In my form header I have fields for Employee Name, Employee ID #, Vehicle
Type, Vehicle #, Classification, etc. I want to be able to click the drop
down list and select the employee name. After the emloyee name is
selected I
would like all of the other fields to pre populate with that employee's
info.
Do I need two different tables with a unique Identifier for each employee
with some sort of validation process through a query? Is that completely
wrong and there is some other way to do this? Any suggestions would be
greatly appreciated.
The ComboBox Wizard offers you an option for locating a particular Record to
display on your Form. Your Form has to be bound to a RecordSource that
contains the Record.

If all that Employee information is in the Header, what's in the Detail?

Larry Linson
Microsoft Access MVP
Feb 9 '07 #3

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

Similar topics

7
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,
4
by: Lumpierbritches | last post by:
Thank you once again for any and all assistance. I'm building an application that's getting quite bulky due to the number of forms, macros and procedures. I was wondering if there's a way to use 1...
2
by: Janus | last post by:
Hello. I need a little advice for populating the treeview control. I dont want my application to hang while populating the treeview, there is a lot of data what's the best approach? Maybe...
5
by: | last post by:
Trying to learn about manipulating collections of objects, and populating these objects dynamically from datasources. Could someone post a code sample that shows the following: Instantiating a...
3
by: sck10 | last post by:
Hello, I am creating a form for users to enter information about a lab and the members of the lab. I have one form (FormView) that they use to enter information about that lab. The keyvalue is...
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...
0
by: koonda | last post by:
Hi all, I have a Project due after one week. It is a web service project. I have a Web Form which communicates to the web service and this web service communicates to the database. I have all my...
4
by: prosad | last post by:
hello, Just solved a problem using Javascript onclick, can click on any cell in a dynamic table and it will pass the innerText object value to my form text field. parts of code given below: ...
3
by: davenumber40 | last post by:
I’m creating a small database in Access 2003(XP) to track issues during software testing. As far as databases go, it’s going to be a relatively small, short term project (No more than 20,000 records...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...

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.