some time's it works, some time it don't 
Author Message
 some time's it works, some time it don't

Hi, I am using a special textbox control that I made that doesn't allow
other input than dec. point, zero and numbers in the right places. I have
several of these on my main form, some do not work (i.e. will take several
zero's in a row and should not) and some work.

Could this have something to do with using Form_Load instead of
Form_Activate.

Thanks

Jacko



Sat, 09 Mar 2002 03:00:00 GMT  
 some time's it works, some time it don't
There is too much code to show.  The problem is that it used to work and now
it does`nt.
The code that is in the modified control is straight forward. KeyUp is
basically modified so that only number or decimal point is accepted with
certain conditions. Problem is some of them work and some don`t on the same
form.

Jacko


Quote:
> Show us some code, Jacko. Let the dog see the rabbit ;-)

> Mike



> > Hi, I am using a special textbox control that I made that doesn't allow
> > other input than dec. point, zero and numbers in the right places. I
have
> > several of these on my main form, some do not work (i.e. will take
several
> > zero's in a row and should not) and some work.

> > Could this have something to do with using Form_Load instead of
> > Form_Activate.

> > Thanks

> > Jacko



Sat, 09 Mar 2002 03:00:00 GMT  
 some time's it works, some time it don't
Show us some code, Jacko. Let the dog see the rabbit ;-)

Mike


Quote:
> Hi, I am using a special textbox control that I made that doesn't allow
> other input than dec. point, zero and numbers in the right places. I have
> several of these on my main form, some do not work (i.e. will take several
> zero's in a row and should not) and some work.

> Could this have something to do with using Form_Load instead of
> Form_Activate.

> Thanks

> Jacko



Sun, 10 Mar 2002 03:00:00 GMT  
 some time's it works, some time it don't
I prefer the KeyPress event.
Check if the KeyAscii argument is equal to the characters you want to
permit.
If it isn't, set KeyAscii to zero. Note, the user can still cut and paste
invalid
characters unless you disable that also. I used to know how but have
forgotten,
maybe someone else knows how to disable copy/paste in a textbox.

Jason


Quote:
> There is too much code to show.  The problem is that it used to work and
now
> it does`nt.
> The code that is in the modified control is straight forward. KeyUp is
> basically modified so that only number or decimal point is accepted with
> certain conditions. Problem is some of them work and some don`t on the
same
> form.

> Jacko



> > Show us some code, Jacko. Let the dog see the rabbit ;-)

> > Mike



> > > Hi, I am using a special textbox control that I made that doesn't
allow
> > > other input than dec. point, zero and numbers in the right places. I
> have
> > > several of these on my main form, some do not work (i.e. will take
> several
> > > zero's in a row and should not) and some work.

> > > Could this have something to do with using Form_Load instead of
> > > Form_Activate.

> > > Thanks

> > > Jacko



Sun, 10 Mar 2002 03:00:00 GMT  
 some time's it works, some time it don't
Jacko, I may be wrong, but usually when I get a "sometimes it works
sometimes it doesn't" problem, I suspect that my variables are to blame. It
may be that you are using common variables throughout the project which get
set and unset by various routines. Try using unique vcariables in your text
box routine, and if need be make sure that they are set to default values at
the start of the routine.

Sorry if that's not very helpful, but as the other nice man said, it's not
easy to help without seeing the code.

Quote:

>Hi, I am using a special textbox control that I made that doesn't allow
>other input than dec. point, zero and numbers in the right places. I have
>several of these on my main form, some do not work (i.e. will take several
>zero's in a row and should not) and some work.

>Could this have something to do with using Form_Load instead of
>Form_Activate.

>Thanks

>Jacko



Wed, 13 Mar 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Don't allow two users to work on same record at same time

2. MovePrevious don't work but the MoveNext work's fine

3. Don't have time to lurk...sorry?! :)

4. SQL Server date/times don't fully show in Access

5. locking databases (don't want more than one user to update at a time)

6. Migrating Databases: Don't Know Path Until Run Time

7. I've programmed a game that don't work Help

8. Run-Time Error 2486 - Can't Carry Out Operation at Present Time

9. Another Out of Memory problem, this time it's in compile time

10. How to get server's time rather than the time of local machine

11. Script works, script don't work

12. Sending Email won't work the second time

 

 
Powered by phpBB® Forum Software