PC Review


Reply
Thread Tools Rate Thread

Data Availability - Timing

 
 
alhotch
Guest
Posts: n/a
 
      6th May 2010
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' ?
 
Reply With Quote
 
 
 
 
KARL DEWEY
Guest
Posts: n/a
 
      6th May 2010
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' ?

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      6th May 2010
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" <(E-Mail Removed)> wrote in message
news:7CE99089-7E43-4D47-B295-(E-Mail Removed)...
> 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' ?



 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      6th May 2010
On Thu, 6 May 2010 09:24:01 -0700, alhotch <(E-Mail Removed)>
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]
 
Reply With Quote
 
alhotch
Guest
Posts: n/a
 
      7th May 2010
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 <(E-Mail Removed)>
> 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]
> .
>

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      7th May 2010
On Fri, 7 May 2010 08:58:01 -0700, alhotch <(E-Mail Removed)>
wrote:

>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.


You can explicitly save the record in some form event, so long as the record
*can* be saved (all required fields have data, for example). For instance if
you want the LastName field to be immediately available you can put code in
the LastName textbox's AfterUpdate event:

Private Sub LastName_AfterUpdate()
If Me.Dirty Then Me.Dirty = False
End Sub

or you can use the SaveRecord action in a Macro in the same event.
--

John W. Vinson [MVP]
 
Reply With Quote
 
alhotch
Guest
Posts: n/a
 
      7th May 2010
Thanks again, John for your prompt reply. As always, I can count of you guys
for swift and accurate responses !!! I will use your ideas !!!

"John W. Vinson" wrote:

> On Fri, 7 May 2010 08:58:01 -0700, alhotch <(E-Mail Removed)>
> wrote:
>
> >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.

>
> You can explicitly save the record in some form event, so long as the record
> *can* be saved (all required fields have data, for example). For instance if
> you want the LastName field to be immediately available you can put code in
> the LastName textbox's AfterUpdate event:
>
> Private Sub LastName_AfterUpdate()
> If Me.Dirty Then Me.Dirty = False
> End Sub
>
> or you can use the SaveRecord action in a Macro in the same event.
> --
>
> John W. Vinson [MVP]
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data availability best practices? Jim Hubbard Microsoft C# .NET 3 24th Mar 2006 04:57 AM
Data availability best practices? Jim Hubbard Microsoft VB .NET 3 24th Mar 2006 04:57 AM
Data availability when a from loads =?Utf-8?B?dmlydHVhbGpheQ==?= Microsoft Access Form Coding 2 6th Dec 2004 05:11 AM
Attendee availability not showing user availability Ed Konopczynski Microsoft Outlook Calendar 0 27th Apr 2004 08:52 PM
Re: Timing data values [MVP] S. Clark Microsoft Access 0 9th Jul 2003 02:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:13 AM.