A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Problem with mouse wheel



 
 
Thread Tools Display Modes
  #1  
Old March 23rd, 2010, 07:41 AM posted to microsoft.public.access
Koulla
external usenet poster
 
Posts: 26
Default Problem with mouse wheel

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
  #2  
Old March 23rd, 2010, 12:21 PM posted to microsoft.public.access
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default Problem with mouse wheel

hi Koulla,

On 23.03.2010 08:41, Koulla wrote:
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 --
  #3  
Old March 24th, 2010, 06:07 AM posted to microsoft.public.access
Koulla
external usenet poster
 
Posts: 26
Default Problem with mouse wheel

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


"Stefan Hoffmann" wrote:

hi Koulla,

On 23.03.2010 08:41, Koulla wrote:
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 --
.

  #4  
Old March 24th, 2010, 08:52 AM posted to microsoft.public.access
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default Problem with mouse wheel

hi Koulla,

On 24.03.2010 07:07, Koulla wrote:
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 --
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:21 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.