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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|