edit: fields shown in pictures below have "value list" row source type. input in these fields used in queries pull data tables well, these fields not use tables.
i have form in access requires users provide input via listboxes, , queries use data perform calculations. however,when entire access file closed, same input values still in listbox after reopening.
ideally want values in input fields default 0 (not null) access file closed (or re-opened), when user opens database, see value "0" in fields. reason why want value 0 default because inputboxes reflect possible commodities product can contain, , want allow users define % commodity product or not contain. 0 means product not contain commodity , user not have change value in listbox (more user friendly in opinion). picture illustration:
hence each time re-open access file, keep seeing input values above, while want them 0.
i did research don't understand how use expression builder, , can't find way make work via macro. read listboxes having 'bound', i'm not entirely sure how deal this.
this above listboxes in design view:
you using listboxes @ height of 1 selection not optimal use such form control no multiple listing shown @ once together.
consider using free-form textboxes default value of zero. if need control user's input, use combo boxes defaults 0 selection item. right now, each listbox defaulting first selection item.
here how property sheet / data tab of combox (in fact default value might redundant 0 first item):
row source : 0;20;40;60 row source type: value list ... default value : 0
if combo boxes use table/query row source, need append value of 0 union query:
row source : select top 1 0 colname tablename union select val tablename; row source type: table/query ... default value : 0
Comments
Post a Comment