Data Availability - Timing

A

alhotch

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

KARL DEWEY

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

Douglas J. Steele

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

John W. Vinson

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

alhotch

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
 
J

John W. Vinson

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

alhotch

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top