Re: form default from a second field



John, thanks. Your original code works fine, now that I ironed out a few
problems like redefining the Zip field as text and not combo, and formatting
input to include leading zeroes. In general, I am having trouble getting a
grip on how to address cells in Access in a manner analogous to arrays in
Basic or Fortran, to use them for defaults. Slowly it coming, however,
thanks in part to your help.

"John Vinson" wrote:

> On Wed, 7 Sep 2005 19:15:03 -0700, "Arch"
> <Arch@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> >John, thanks for you help. I may be almost there. In the form, Town is
> >entered via a combo box (driven by a "list" table), Zip by a text box. I put
> >the code you recommended into the AfterUpdate event of the combo, including
> >".Column(2)". I also changed the Control Source for the Zip text box to the
> >Town field name. When I select a Town name, what appears in the Zip text box
> >is the correct line number of the "list" table, not the Zip code itself.
>
> Well, it's not Column(2) then. The Column property is zero based; (2)
> means "retrieve the third field from the combo box's Row Source
> query".
>
> Take a look at the Row Source query in data*** view, and see which
> column contains the zip. Subtract one and use that number as the
> Column() property.
>
> John W. Vinson[MVP]
>
.