Problem with mouse wheel

  • Thread starter Thread starter Koulla
  • Start date Start date
K

Koulla

Hi I have a form and with mouse wheel record change and go to the next. That
is ok I want to do that but I check a value of a field call System and I want
if me.system.value <> "specific system" then
me.station.visible = false
else
me.station.visible = true
end if

Unfortunately this part of IF statement does not work correct. From the
debuging I made I realized that me.system.value has the value of the previous
record before the mouse wheel !!! How can I fixed that ????

Thank you in advance
 
Koulla said:
Hi I have a form and with mouse wheel record change and go to the next.
That
is ok I want to do that but I check a value of a field call System and I
want
if me.system.value <> "specific system" then
me.station.visible = false
else
me.station.visible = true
end if

Unfortunately this part of IF statement does not work correct. From the
debuging I made I realized that me.system.value has the value of the
previous
record before the mouse wheel !!! How can I fixed that ????

Thank you in advance
 
hi Koulla,

Hi I have a form and with mouse wheel record change and go to the next. That
is ok I want to do that but I check a value of a field call System and I want
if me.system.value<> "specific system" then
me.station.visible = false
else
me.station.visible = true
end if

Unfortunately this part of IF statement does not work correct. From the
debuging I made I realized that me.system.value has the value of the previous
record before the mouse wheel !!! How can I fixed that ????
Which event is involved here? Post the complete method, please.

mfG
--> stefan <--
 
Here is the complete procedure

Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
if me.system.value<> "specific system" then
me.station.visible = false
else
me.station.visible = true
end if
End sub
 
hi Koulla,

Here is the complete procedure

Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
if me.system.value<> "specific system" then
me.station.visible = false
else
me.station.visible = true
end if
End sub
This kind of code should be placed in the On Current event:

Private Sub Form_Current()

txtStation.Visible = (Me![System] <> "Specific System")

End Sub

btw, you should rename your controls when they are referenced in code to
distinguish between them and fields. Me![System] is accessing the field
value.


mfG
--> stefan <--
 
Back
Top