Unbound form's text box. Can I tell if it is dirty

  • Thread starter Thread starter Hindsey
  • Start date Start date
H

Hindsey

Hello, can anyone tell me how I would be able tell in code if a field on an
unbound form has been edited before I perform an action? Below is my
explanation:

I am going to be having 2 or 3 computers using this same form, and the data
is on a SQL Server Express. There's a list box, that when clicked on, the
information from a record populates the form. Since multiple people are
looking at, and may be changing the information on this record at the same
time, I don't want to use a bound form... So, whenever a field is updated,
SQL code runs updating the table. I also have an OnTimer even that checks the
table on the server to see if it has been updated. If it has been, then I
need to update the local form's data again.

The problem is that if the local form's data needs to be udpated, and I am
in the middle of typing in a field, that field gets erased. I would like to
be able to tell in the code that I am in the middle of updating that field,
and basically, to skip updating that field.

Any ideas?

Thanks
 
hi Hindsey,

I'll buy a "L".
Since multiple people are
looking at, and may be changing the information on this record at the same
time, I don't want to use a bound form...
You'll get a message when using a bound form and you'll trying to change
data which has already changed on the server.
So, whenever a field is updated,
SQL code runs updating the table. I also have an OnTimer even that checks the
table on the server to see if it has been updated. If it has been, then I
need to update the local form's data again.
Use a bound form and in the timer event call Me.Requery. This should be
sufficent.
The problem is that if the local form's data needs to be udpated, and I am
in the middle of typing in a field, that field gets erased. I would like to
be able to tell in the code that I am in the middle of updating that field,
and basically, to skip updating that field.
That is the timer event. You'll need to disable the timer while changing
a field.


mfG
--> stefan <--
 
Disabling the Timer event seems to be the direction that I will need to go
on. I hadn't thought about that... Thanks!
 
Hindsey said:
Hello, can anyone tell me how I would be able tell in code if a field on
an
unbound form has been edited before I perform an action? Below is my
explanation:

I am going to be having 2 or 3 computers using this same form, and the
data
is on a SQL Server Express. There's a list box, that when clicked on, the
information from a record populates the form. Since multiple people are
looking at, and may be changing the information on this record at the same
time, I don't want to use a bound form... So, whenever a field is updated,
SQL code runs updating the table. I also have an OnTimer even that checks
the
table on the server to see if it has been updated. If it has been, then I
need to update the local form's data again.

The problem is that if the local form's data needs to be udpated, and I am
in the middle of typing in a field, that field gets erased. I would like
to
be able to tell in the code that I am in the middle of updating that
field,
and basically, to skip updating that field.

Any ideas?

Thanks
 
Back
Top