RE: TextBox easy lost focus

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Mark" wrote:

Hi,

I have form and TexBox on the form.
This TextBox is connected with the field in database. I added
LostFocus event to this TextBox. In this event I update all form and
database.

But the event is raised when user click in another control like
TextBox or ComboBox.

I want my TexbBox to lost focus after clicking in everything (in the
form too). Maybe I chose wrong event ?

Thanks for help


Hi Mark,

You may find it easier to create a [Save] button that triggers the database
update. When the user clicks save you can validate the data before the
database update occurs and give feedback on any invalid data found.

--
Happy Coding!
Morten Wennevik [C# MVP]
.



Relevant Pages

  • Re: What is Postback?
    ... With ASP.NET we have the concept of a postback. ... Now the TextBox is displayed on the webpage with the value from the database ... The Page_Load event fires, queries the database, and populates the ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: What is Postback?
    ... With ASP.NET we have the concept of a postback. ... Now the TextBox is displayed on the webpage with the value from the database ... The Page_Load event fires, queries the database, and populates the ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Combo box woes
    ... tables or fields I've got is Lookup data, ... not entirely sure what that is) is set to database default in my textbox ... >> I've included the Find button, which when clicked makes my textbox visible ... >>> will enter a string that is the search string. ...
    (microsoft.public.access.forms)
  • Re: Creating search form to return results in report
    ... Allen Browne - Microsoft MVP. ... Are they check boxes? ... >> The sample database in the article shows the search results in the>> form, ... >>> name in one textbox, ...
    (microsoft.public.access.formscoding)
  • Re: VB .Net (VisualStudio 2005) and the SQL Server SMO Object question
    ... you say there is only one textbox and one button on your form. ... Dim myServer As New Server ... ' If no database is selected, ... Dim MyBackup As New Backup ...
    (microsoft.public.dotnet.languages.vb)