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

VIEWING LISTING WITH PRE FIX NOT VISIBLE

Status
Not open for further replies.

Kevsim

Instructor
Apr 18, 2000
385
AU
I have a database based on Products and another based on Equipment. I would like to combine both databases into one without adding any more forms or controls. In the product form all products would be pre fixed with “P_” and all equipment pre fixed with “E_”, this would limit the length of the listings. When viewing the listing from a combo box there would be a button for only listing “P_” prefixed items and another for listing the “E_” items. When viewing the items in the listing the prefix would not be visible, how could this be achieved. Your advise would be appreciated.
kevsim
 
Assuming that the p_ and e_ codes are the actual keys to the tables, do something like the following as the rowsource for your combobox:

Select ProductID, Mid$(ProductID, 3) As ProdID From tblName ORDER BY ProdID;

In your combobox, make the bound column 1, column count 2 and column widths to 0. Setting column widths to 0 will hide the first column from you query and display the second one with the prefixes removed. The Order By might require the expression instead of the assigned name.

Hope this helps! Good Luck! Please remember to give helpful posts the stars they deserve! This makes the post more visible to others in need![thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top