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
|
|||
|
|||
Remove Focus From text box
I am using the forms beforeupdate event to check some textbox values. To do
this I have set the focus to one of the textboxes to get its value. The problem I am having is that if I make anychanges on the record then click to move to the next record the form doesn't advance unless I click the next record button twice. Any Idea what might be causing this? Neal |
#2
|
|||
|
|||
Remove Focus From text box
You are confusing Access. Setting the focus to a different control means
that you have to exit that control and go back to where the code was executing before you changed focus. But, it is not necessary to set the focus to a control to get its value. -- Dave Hargis, Microsoft Access MVP "Neal Ostrander" wrote: I am using the forms beforeupdate event to check some textbox values. To do this I have set the focus to one of the textboxes to get its value. The problem I am having is that if I make anychanges on the record then click to move to the next record the form doesn't advance unless I click the next record button twice. Any Idea what might be causing this? Neal |
#3
|
|||
|
|||
Remove Focus From text box
On Thu, 15 Oct 2009 09:25:59 -0700, Neal Ostrander
wrote: I am using the forms beforeupdate event to check some textbox values. To do this I have set the focus to one of the textboxes to get its value. Well, no, you actually don't. The textbox's Text property is only available when the textbox has the focus, but its (default) Value proprety is available anytime. In the Form's BeforeUpdate event you can refer to Me!textboxname or Me!textboxname.Value with or without a setfocus. The problem I am having is that if I make anychanges on the record then click to move to the next record the form doesn't advance unless I click the next record button twice. Any Idea what might be causing this? Neal Please post your code. -- John W. Vinson [MVP] |
#4
|
|||
|
|||
Remove Focus From text box
Thanks John
Using the Me!texboxname and getting the value worked. Just started programming Access and not real familiar with all these great features yet. Thanks Again Neal "John W. Vinson" wrote: On Thu, 15 Oct 2009 09:25:59 -0700, Neal Ostrander wrote: I am using the forms beforeupdate event to check some textbox values. To do this I have set the focus to one of the textboxes to get its value. Well, no, you actually don't. The textbox's Text property is only available when the textbox has the focus, but its (default) Value proprety is available anytime. In the Form's BeforeUpdate event you can refer to Me!textboxname or Me!textboxname.Value with or without a setfocus. The problem I am having is that if I make anychanges on the record then click to move to the next record the form doesn't advance unless I click the next record button twice. Any Idea what might be causing this? Neal Please post your code. -- John W. Vinson [MVP] . |
Thread Tools | |
Display Modes | |
|
|