My Assistant
![]() ![]() |
|
|
Oct 19 2005, 08:45 AM
Post
#1
|
|
|
UtterAccess Addict Posts: 112 |
I have a database that I am storing part numbers in.
In my form the part number is the index field for my combo box, and the display information is the part number - part description. (part:[part_num] & " - " & [part_desc] The part number is a text field due to - alpha characters in it. Problem is some parts show up with part - descr others it is blank. Any clues why?? Aazzner |
|
|
|
Oct 19 2005, 08:54 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 5,200 From: Denver, Colorado [USA] |
Try this to see if it fixes the problem:
part:NZ([part_num],"") & " - " & NZ([part_desc],"") Assuming there are values in your table for part_num and part_desc, you shouldn't get blanks (at the very least, you should get a hyphen). Also, check your query to make sure it isn't exluding any rows you expect returned. |
|
|
|
Oct 19 2005, 12:36 PM
Post
#3
|
|
|
UtterAccess Addict Posts: 112 |
Thank you Peter.
I have a couple of examples part_num part_desc 11210591-12 TUBE W/ONE MOLDED E/F 02164901 CARRIER 02168101 CONDUIT BULK / CUT LENGTH 11230536 BODY SUB ASSEMBLY They should come out looking like the following 11210591-12 - TUBE W/ONE MOLDED E/F 02164901 - CARRIER 02168101 - CONDUIT BULK / CUT LENGTH 11230536 - BODY SUB ASSEMBLY And in the table I have the Part_Number field set as a look up to pull it this way and it works. But in the form, these values don't appear. You can type in the part number and it shows up, but when you tab on to the next control it disappears. I can't figure out why. The NZ() only works if there is possibly a null value there correct? Aazzner |
|
|
|
Oct 19 2005, 01:59 PM
Post
#4
|
|
|
UtterAccess VIP Posts: 5,200 From: Denver, Colorado [USA] |
It sounds like the problem is not in your query, but in the formatting of your combo box.
Likely, your combo box has a query underlying it that is returning more than one column. The important properties to check in your combo box are: COLUMN COUNT COLUMN WIDTHS BOUND COLUMN You want to bind your combo box to column 1, set your column count to 2, and your column widths to something like 0";2". Also, note that LOOKUPS in a table (as you mentioned) are considered bad form. They just cause problems. Tables hold data, forms are for data entry. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 18th May 2013 - 03:39 PM |