Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to select entire record on form

Status
Not open for further replies.

aaronmc52

MIS
May 6, 2003
11
US
Hello,
I am stuck on an issue using Access 2000. I have a form that consists of three drop down menus (look-up from a table) and three text boxes. I am trying to get the form to allow the user to select the data that they need in the three drop downs and have the form fill in the matching data from the same record in the table on the text boxes. For example if a record in the table contains the following: paperwt = 27 lb., pgspersig = 32, jobtype =8X10 And Larger, sigsperlift = 100, liftsperlayer = 17, layersperskid = 10.
A user will select the data to appear in the three combo boxes which are paperwt, pgspersig and jobtype. So in this case they will select 27 lb., 32, 8x10 And larger - respectivly. Then after update the text boxes need to fill in the corresponding data from that same record. So in this case the three text boxes would display 100, 17 and 10.
I can get the form to do this by looking up on one field, but not on all three fields. Can anybody offer any advice on what or how I should go about accomplishing this task.
Thanks.
 
If the data you wish to transpose is held within each table ie:
27, 100 - table 1
32, 17 - table 2
8x10, 10- table 3
Then in the after update event of each combo type:
Me.Text1 = Me.Combo1.Column(1)
Me.Text1 would vary with the name of the textbox to be filled.
Me.combo1 would vary with the name of each combo being selected
Column(1) is the second column counting from zero

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Currently all of my data is located in one table. There are only about 50 different records, each one is unique. Do you reccomend setting this up differently?
If so how?

Thanks,

Aaron
 
How is the data of combo content and textbox requirement setup in the table?

To explain:
if the 2 fields for exch combination exist in the table on the same row then we can set of the combo data to hold the data we require in the textboxes.
So if 27 & 100 are in the same record in the table then we can capitalise on that!

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Each record in the table is different. The three fields that go with the combo boxes are from the table and they determine what is in the text boxes. They are all from the same record row in the table. I think that I am doing a poor job at explaining this. I appologize, I have uploaded the database to Perhaps it will be easier for you to see what I am trying to do by looking at it.

Thanks,
Aaron
 
Aaron,
please send me your email address so that I can returm your copy application to demonstrate the changes made.
To explain: The 3 fields that you were trying to match were part of a record were you wanted to pick up the remaining data in that specific record and because they were all uniquely identified with an autonumber you only need to get the autonumber, so what I have done is:
- put a search combo in the form header which is populated with the 3 fields you want to match in rows ie:
Line 50 is 27, 16, 7x9 and the 3 fields you want to populate the form with are in the same record as:
200, 20, 10 so there are 7 cols in the query with 1 being the autonumber 2,3 & 4 are selection criteria and 5,6 & 7 are the fields you want to populate in form textboxes.
- I have made all fields bound with the exception of the "Search" combo
- I have added the combo address to the forms query so that after selection the form is requeried by the autonember and in the After_Update event I have put code to fire off the query with the new autonumber inserted...
I think it would be easier to look through than read this rubbish....




Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top