473,467 Members | 1,604 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

mousewheelhook Stephen Lebans

Hi Stephen Lebans
Thank you very much for your effort and time you have spent writing
and helping small hacks like me.
I have just one problem with your mousewheelhook.
I'm using Access 2002.
I have db with an unbounded Main Form with numerous sub forms. The
mousewheelhook works find with the subforms in the Main Form.
Mousewheelhook is loaded in the Main Form Load event and unloaded in
the same form in the unloaded event.
The problem is from loading a popup form from a list box in the
subforms. Double clicking in the list box calls the form with the
selected record. The record shows up in the popup form, but when you
move the mouse wheel, it cycles between the select record and a new
record. If you go to the list box in the popup form, and select
another record, the record is loaded and the mousewheelhook works
fine. But if you use a new record button, you load a new record but
when you use the mouse wheel you can cycle from the last record loaded
and the new record selected. I don't know if its my coding or
something else.

Here is my code from a Listbox in a subform that loads a popup form.

strFrmName = "frmOrdItems"
If Not IsNull(Me.txtOrdID.Value) Then
If Not IsNull(Me.lstItems.Column(6)) Then
lngItemNo = Nz(Me.lstItems.Column(6), 0)
Form_frmMain.txtRecExt.Value = lngItemNo
strItemNo = str(lngItemNo)
strLinkCriteria = "[OrdItemsID]=" & strItemNo
DoCmd.OpenForm strFrmName, acNormal, , strLinkCriteria
Else
DoCmd.OpenForm strFrmName, acNormal
DoCmd.GoToRecord acDataForm, strFrmName, acNewRec
End If
Else
MsgBox "Please Select or Add Order!", vbCritical, "Order No Error"
End If
Any help would be greatly appreciated Steven.

Thanks again for your time and understanding.

Chris Sydney Austraila
Nov 13 '05 #1
1 1825
Can you send me the MDB that demonstrates this issue?
Go to my Web site and submit Feedback with a valid EMail address. I'll
reply with my Email address.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"ChrisR" <ch***@krisaracomputers.com.au> wrote in message
news:97**************************@posting.google.c om...
Hi Stephen Lebans
Thank you very much for your effort and time you have spent writing
and helping small hacks like me.
I have just one problem with your mousewheelhook.
I'm using Access 2002.
I have db with an unbounded Main Form with numerous sub forms. The
mousewheelhook works find with the subforms in the Main Form.
Mousewheelhook is loaded in the Main Form Load event and unloaded in
the same form in the unloaded event.
The problem is from loading a popup form from a list box in the
subforms. Double clicking in the list box calls the form with the
selected record. The record shows up in the popup form, but when you
move the mouse wheel, it cycles between the select record and a new
record. If you go to the list box in the popup form, and select
another record, the record is loaded and the mousewheelhook works
fine. But if you use a new record button, you load a new record but
when you use the mouse wheel you can cycle from the last record loaded
and the new record selected. I don't know if its my coding or
something else.

Here is my code from a Listbox in a subform that loads a popup form.

strFrmName = "frmOrdItems"
If Not IsNull(Me.txtOrdID.Value) Then
If Not IsNull(Me.lstItems.Column(6)) Then
lngItemNo = Nz(Me.lstItems.Column(6), 0)
Form_frmMain.txtRecExt.Value = lngItemNo
strItemNo = str(lngItemNo)
strLinkCriteria = "[OrdItemsID]=" & strItemNo
DoCmd.OpenForm strFrmName, acNormal, , strLinkCriteria
Else
DoCmd.OpenForm strFrmName, acNormal
DoCmd.GoToRecord acDataForm, strFrmName, acNewRec
End If
Else
MsgBox "Please Select or Add Order!", vbCritical, "Order No Error"
End If
Any help would be greatly appreciated Steven.

Thanks again for your time and understanding.

Chris Sydney Austraila


Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Wally | last post by:
Hi All, I'm using Stephan Lebans' nifty code for automatically resizing text fields to the size required to show (almost) all text in that field (CanGrow3, thanks Stephen!). In general this...
11
by: Patrick | last post by:
I am using Stephans code to change the background color of the Access container in Access 97, the code works fine when running in Access in the normal way. The problem occurs when running the...
1
by: Alex | last post by:
The JustiDirect text justification on Stephen LeBans site works well but I cannot get it to work on a sub report. Could anyone tell me if this is possible. Thanks. Alex
3
by: Alex Wisnoski | last post by:
I am trying to adapt Lebans' ReportUtilities to export reports (to preserve formatting) from an Access 97 application. I have made the reference to his mde and copied the modules into my db. I...
4
by: Karl Roes | last post by:
Hi Stephen, Very Cool. I can only get it working on the first row of a continuous form. Is this correct? Regards Karl
3
by: Phil Stanton | last post by:
I am trying to produce a program that will output any Access report to an editable Word document. So far it is working well but slowly with text boxes, labels, and lines. I now need to try to...
3
by: Rémi | last post by:
Hello all! I've been using Stephen Lebans' MouseWheel stuff for a number of years now, without problems. I've used on different combinations of Access and Windows, and have had great results with...
14
by: nospamhere | last post by:
Hello Stephen and all, This is such a cool group. I really need to spend more time here. A few months ago I noticed some brief discussion here about the fact that your excellent HTML Editor...
8
by: grant | last post by:
Hi I've copied Stephens code into my db, and can get it to work, but only on "plain Jane" reports with no images. Most of my reports has an unbound image obluect in them that I set to an...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.