ms access - MS access2013 datasheet shows display values, but listbox only shows ID -
i have table named "customers", , table named "cases". these relate real estate transactions. on table "cases" have field "other party", lets enter new customer or pick existing 1 if have had person in our database different transaction.
i have created form listbox can search case records via customer , other party fields (i show other info case not needing search info). in formview listbox shows customer name, shows id number other party. when go rowsource, buildevent, , see query in datasheet view, records display way want them -by name, not showing id numbers.
why won't display correctly on listbox??? please help! have spent way many hours trying figure out :( first time using access , figuring out go.
this sql query in listbox rowsource:
select query3.customers.id, query3.[last name], query3.[first name], query3.[other party], query3.[property address], query3.[assigned to], query3.lawyer query3;
and sql query3:
parameters [ [forms]]![frm_searchmulti]![srchtext] text ( 255 ); select casesall.* casesall (((casesall.[last name]) "*" & [forms]![frm_searchmulti]![srchtext] & "*")) or (((casesall.[first name]) "*" & [forms]![frm_searchmulti]![srchtext] & "*")) or (((casesall.[other party]) "*" & [forms]![frm_searchmulti]![srchtext] & "*"));
listboxes , combo boxes have hidden column feature, primary/foreign key of underlying table. users not know primary key should pick, hence connecting name/item displays selection. situation sounds key not being hidden displaying , 2 columns designated, not see other party
field.
to fix, under property sheet / format tab of listbox, adjust column count , corresponding column widths according query (i.e., recordsource of listbox). shown below first column of query hidden 0 inches of display while next 2 fields display @ 2 inches:
column count: 3 column widths: 0"; 2"; 2" ... list width: 4"
be sure column widths add list width or there cut-offs. also, inches automatically added when enter numbers. finally, note data value of listbox whatever designated in bound column under property sheet / data tab:
bound column: 1
usually, bound column hidden field or wouldn't hidden or used!
Comments
Post a Comment