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

Defaul Value in a Control, expression or VBA

Status
Not open for further replies.

randifprf

Technical User
Aug 22, 2004
11
US
This is probably so simple, but I'm brain dead now.
A number of places I have an ID number showing where I'd like to have the name. Easy If I use a combo box, but I just what a text box to get the name corresponding to the ID number.

Example have a form (Orders) with a (Order Detail)subform.
Nither control source for the form or subform has the Product Name, (That stays with the Parent or subform).The subfom is a continuous form. The Subform is filled from unbound hidden text boxes passed to the subform from an add button. Successive list boxes fill the unbound text boxes. the ProductName and ProductID are in a table "Products".

When I see how I'll kick myself I'm sure. Any Help Greatly appreciated.
 
If you have a table with for example an id called deptcode and a corresponding field in that table called deptname. then change the control source of the text box to deptname instead of the id field. Sustitute field nameds accordingly


Program Error
Why is it, I still think in terms of spectrum BASIC!
 
The control for the ID is in a subform "Orders" based on a query and The name is not available. I tried adding the product table to the query, to get the name but got poor results trough the rest of the subform.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top