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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|