From: alhotch on
At what point is the data just entered into a NEW form (as in data entry)
available to be used ?

I have a data entry form with the usual fields - ie Name; Address; Phone;
etc. I would like the new entries to be used to populate a combo box. So, If
I just enter the Name, can I use it to "lookup" other information based on
this Name field BEFORE I enter any mor ionfo on this data entry form ?

Just when is the data available ? Just when is the record written to the DB
? If I use Autonumber, I get the next autonumber immediately after i key the
first character into the form. Does this mean the data is written to the DB
at that time or is there some "delay' ?
From: KARL DEWEY on
On most (some folks do some extra programing stuff) it is available as soon
as the cursor leaves the field/textbox.
BUT, the combo has to be refreshed.

--
Build a little, test a little.


"alhotch" wrote:

> At what point is the data just entered into a NEW form (as in data entry)
> available to be used ?
>
> I have a data entry form with the usual fields - ie Name; Address; Phone;
> etc. I would like the new entries to be used to populate a combo box. So, If
> I just enter the Name, can I use it to "lookup" other information based on
> this Name field BEFORE I enter any mor ionfo on this data entry form ?
>
> Just when is the data available ? Just when is the record written to the DB
> ? If I use Autonumber, I get the next autonumber immediately after i key the
> first character into the form. Does this mean the data is written to the DB
> at that time or is there some "delay' ?
From: Douglas J. Steele on
It's not really clear to me what you mean by using the new entries to
populate a combo box, but to lookup other information.

The data you've typed into the Name text box is instantly available, even
while you're typing it. You couuld put code in the On Exit event of the text
box to do your lookup.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"alhotch" <alhotch(a)discussions.microsoft.com> wrote in message
news:7CE99089-7E43-4D47-B295-1E17CA2AA9F7(a)microsoft.com...
> At what point is the data just entered into a NEW form (as in data entry)
> available to be used ?
>
> I have a data entry form with the usual fields - ie Name; Address; Phone;
> etc. I would like the new entries to be used to populate a combo box. So,
> If
> I just enter the Name, can I use it to "lookup" other information based on
> this Name field BEFORE I enter any mor ionfo on this data entry form ?
>
> Just when is the data available ? Just when is the record written to the
> DB
> ? If I use Autonumber, I get the next autonumber immediately after i key
> the
> first character into the form. Does this mean the data is written to the
> DB
> at that time or is there some "delay' ?


From: John W. Vinson on
On Thu, 6 May 2010 09:24:01 -0700, alhotch <alhotch(a)discussions.microsoft.com>
wrote:

>At what point is the data just entered into a NEW form (as in data entry)
>available to be used ?
>
>I have a data entry form with the usual fields - ie Name; Address; Phone;
>etc. I would like the new entries to be used to populate a combo box. So, If
>I just enter the Name, can I use it to "lookup" other information based on
>this Name field BEFORE I enter any mor ionfo on this data entry form ?
>
>Just when is the data available ? Just when is the record written to the DB
>? If I use Autonumber, I get the next autonumber immediately after i key the
>first character into the form. Does this mean the data is written to the DB
>at that time or is there some "delay' ?

It's a rare day when I disagree with Karl or Doug but... I think they're
mistaken, or at any rate the question isn't that simple! A record is not
available for queries or combo boxes until it's saved to disk, which happens
only when the user moves off the record, closes the form, presses shift-Enter
to explicitly save the record, or the record is saved programmatically.

The value in the textbox is certainly available, by referencing
Forms!formname!textboxname, but it's not stored in the table.
--

John W. Vinson [MVP]
From: alhotch on
I tend to agree with John. I have found that as I enter info into the two
text boxes - FirstName and then LastName, the new entries are not yet
available to be "looked up" in the CBO until I save (or exit) the
record/form. After that, I can use the CBO as I wanted to.

Looks like I will have to take a different approach. I was hoping to make
the data entry process "dymanic" in that I could use an entry into a text
box, immediately available to a CBO upon exit of that text box - not having
to wait until the form was closed, etc.

Thanks for your answers and insight on this aspect of Access. Your comments
are most appreciative !!!

Al

"John W. Vinson" wrote:

> On Thu, 6 May 2010 09:24:01 -0700, alhotch <alhotch(a)discussions.microsoft.com>
> wrote:
>
> >At what point is the data just entered into a NEW form (as in data entry)
> >available to be used ?
> >
> >I have a data entry form with the usual fields - ie Name; Address; Phone;
> >etc. I would like the new entries to be used to populate a combo box. So, If
> >I just enter the Name, can I use it to "lookup" other information based on
> >this Name field BEFORE I enter any mor ionfo on this data entry form ?
> >
> >Just when is the data available ? Just when is the record written to the DB
> >? If I use Autonumber, I get the next autonumber immediately after i key the
> >first character into the form. Does this mean the data is written to the DB
> >at that time or is there some "delay' ?
>
> It's a rare day when I disagree with Karl or Doug but... I think they're
> mistaken, or at any rate the question isn't that simple! A record is not
> available for queries or combo boxes until it's saved to disk, which happens
> only when the user moves off the record, closes the form, presses shift-Enter
> to explicitly save the record, or the record is saved programmatically.
>
> The value in the textbox is certainly available, by referencing
> Forms!formname!textboxname, but it's not stored in the table.
> --
>
> John W. Vinson [MVP]
> .
>