A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Data Availability - Timing



 
 
Thread Tools Display Modes
  #1  
Old May 6th, 2010, 05:24 PM posted to microsoft.public.access.forms
alhotch
external usenet poster
 
Posts: 58
Default Data Availability - Timing

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' ?
  #2  
Old May 6th, 2010, 08:51 PM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Data Availability - Timing

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' ?

  #3  
Old May 6th, 2010, 08:57 PM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Data Availability - Timing

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" wrote in message
...
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' ?



  #4  
Old May 6th, 2010, 11:20 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Data Availability - Timing

On Thu, 6 May 2010 09:24:01 -0700, 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' ?


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]
  #5  
Old May 7th, 2010, 04:58 PM posted to microsoft.public.access.forms
alhotch
external usenet poster
 
Posts: 58
Default Data Availability - Timing

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

  #6  
Old May 7th, 2010, 05:08 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Data Availability - Timing

On Fri, 7 May 2010 08:58:01 -0700, alhotch
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]
  #7  
Old May 7th, 2010, 06:37 PM posted to microsoft.public.access.forms
alhotch
external usenet poster
 
Posts: 58
Default Data Availability - Timing

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

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.