By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,940 Members | 614 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,940 IT Pros & Developers. It's quick & easy.

mousewheelhook Stephen Lebans

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.