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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to populate several textboxes by using an onclick event

Status
Not open for further replies.

whodeycp

MIS
Oct 11, 2007
14
0
0
US
I am using a tab control in my form and I have a subform in the first tab displaying the records from my query. I need to be able to click in a textbox in this form and be able to populate several textboxes in the next tab from the information in this record. I have been trying some different methods but I have had no luck. Can someone please HELP?
 
Yep, I'm sure somebody can help.

What information do you need to populate into the multiple fields and what is going into the one textbox? What code do you have so far?

Ed Metcalfe.

Please do not feed the trolls.....
 
My first tab that I am using is to display all the information that is in the record. I have set the subform to display continuous forms so it shows all of my records. This tab is used for the user to look at all the records and be able to find which one they need to modify. So when they find the record they want to modify, they can dbl-click in the textbox located in the first tab and when this occurs, it will populate all the fields that were located in the first tab in the next tab. Some of the fields are like projectID, comments, description, cost/yr, building name, years amortized, budget year and so on.
 
I have something similar.

There's a combobox (cboUserName)that retrieves data using the following...

SELECT UserName, Dept, PassW FROM tblUsers
ORDER BY tblUsers.UserName;


Set the combo box to as many columns you need, I've used 3 and set the widths of each column to 3cm;0cm;0cm as you only need the UserName in the combo.

Then set up text boxes with a control source(under Properties, Data) as =cboUserName.column(1), which will pick up the Dept value, =cboUserName.column(2) picks up Pass, and so on...

When the value in the combobox changes, so does the values in the textbox.

Hope that helps.

Cheers,

Jon


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top