> What is the Combo Row Source? it is a query = "SELECT
[tblJobLine].[LineNo], [tblLineNumbers].[Description], [tblJobLine].[JobCode]
FROM tblJobLine INNER JOIN tblLineNumbers ON
[tblJobLine].[LineNo]=[tblLineNumbers].[LineNo] WHERE
((([tblJobLine].[JobCode])=[forms].[frmTimeSheet].[txtJobCode] Or
([tblJobLine].[JobCode])=[forms].[frmTimeSheet].[txtAdminCode])) ORDER BY
[tblJobLine].[LineNo]; "
> What is the first item in the list? varies depending on the data in the JobCode field
> Is that first item always the same item? no
The default for the particular jobcode is always at the top of the query
data for the current record, however it is not the same for all job codes.
For instance if jobcode = "025" then lineno can be "25", "26", or "47" - "25"
is listed first
jobcode = "073" then lineno can be "44", or "47" - "44" is listed first
jobcode = "165" then lineno can be "37" or "47" - "37" is listed first
however until jobcode is entered the query just has a "47" record. Once the
job code is entered the lineno field requeries and the list is updated. As
you tab through the fields (lineno tab order is sometime after jobcodes tab
number so it is after lineno) rather than droping the list down to select (or
even as soon as JobCode has been updated) I want lineno to take the value of
the first item of the query for that field.
"fredg" wrote:
> On Mon, 27 Apr 2009 15:13:01 -0700, SuzyQ wrote:
>
> > How can I get access to use the first item in the list of a combo box on a
> > form if the field in question is currently null? I'm trying to speed up data
> > entry, and 99.9% of the time on this particular combo box, the first item in
> > the list is the item the user chooses. It would be nice if they could just
> > tab throug the field and it would populate rather than having to select from
> > the list. Then on the rare case where they select something other than the
> > first item on the list, they could select it.
>
> What is the Combo Row Source?
> What is the first item in the list?
> Is that first item always the same item?
>
> Set the default value to whatever the value is of the bound column
> first row.
> For example, if the Rowsource returns CompanyID and CompanyName
> fields, and the CompanyID of the Company you mostly use is 456, then
> set the Combo default value property to 456.
> Note: the default value can be anywhere in the list, not just the
> first item.
>
> The Default value only comes into usage on new records.
> If you have something else as row source, then you need to give us
> more information.
>
>
> --
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail
>
|