Absolutely ridiculous problem (kinda)...

opopanax666

Registered User.
Local time
Today, 01:05
Joined
Nov 2, 2006
Messages
44
[solved] Absolutely ridiculous problem (kinda)...

Hello everybody,

Got a form with a textbox ("Tekst110") (default value 0), and 1 button on each side, resp. labelled "+" and "-" (you see where I'm going with this, dontcha). So when users press the left button ("Knop114"), the textbox value goes up, press the right one ("Knop115") and it goes down... not exactly rocket science.

The code I use is this:

Code:
Option Compare Database

Option Explicit

Private Sub Knop114_Click()
    
    Me!Tekst110 = Me!Tekst110 + 1
    
End Sub

Private Sub Knop115_Click()
    
    Me!Tekst110 = Me!Tekst110 - 1
    
End Sub

When I press the left button, everything works fine, but when I press the right one, Access simply shuts down. No message, no error, nothing, it just "disappears"...

What in godsname could provoke such a conflict in the simple code I'm using? I'm really at a loss...
 
Last edited:
Have you tried deleting the offending button and replacing it with a new one?
 
Have you tried deleting the offending button and replacing it with a new one?

As I said: ridiculous... Yes, that did the trick and everything works fine now :D

Thanks a million!
 
Is there actually a recordsource behind the form with a field called Tekst110?
I suspect not in which case Me!Tekst110 is not going to work.
Even if so, you should be using Tekst110.Value in code such as this (let Access pass that change onto a bound field where appropriate)
 

Users who are viewing this thread

Back
Top Bottom