Sign Up |  Live StatsLive Stats    Articles 35,345| Comments 159,788| Members 17,820, Newest waheguruhelpme| Online 216
Home Contact
 (Forgotten?): 
    Sikhism

   
                                                                     Your Banner Here!    

Listbox dbl click

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 400 USD, Received: 35 USD (9%)
Please Donate...
Related Topics...
Thread Thread Starter Forum Replies Last Post
ListBox or Subform, which would be better? ortaias@hotmail.com Information Technology 0 28-Jul-2006 08:17 AM
Highlight everything in a Listbox Bob Information Technology 3 28-Jul-2006 08:15 AM
report right click Boots Information Technology 1 28-Jul-2006 08:04 AM
listbox PeterM Information Technology 1 03-Nov-2005 11:35 AM


Tags
listbox, dbl, click
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:19 AM
lmv's Avatar lmv
Guest
 
Posts: n/a
   
   
Listbox dbl click

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
Would someone be able to direct me to an article or an answer to how to dbl
clk on a record in a subform list box and have it open the record in the
parent form OrdersWDetails form.
If more info is needed the following doesn't work OrderID is Number:
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/11225-listbox-dbl-click.html
Private Sub List0_DblClick(Cancel As Integer)
Dim stDocName As String
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225
Dim stLinkCriteria As String
'need to get this to open record clicked on don't know if it is DLookup or ??
'stDocName = Me.OrderID.OrdersWDetails
DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub
Thanks!



 
Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:19 AM
Dirk Goldgar's Avatar Dirk Goldgar
Guest
 
Posts: n/a
   
   
Re: Listbox dbl click

"lmv" wrote in message
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225
news:4BD16916-5CD7-4FC5-BC5D-03AB7EEEB6C2@microsoft.com
> Would someone be able to direct me to an article or an answer to how
> to dbl clk on a record in a subform list box and have it open the
> record in the parent form OrdersWDetails form.
> If more info is needed the following doesn't work OrderID is Number:
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225
> Private Sub List0_DblClick(Cancel As Integer)
> Dim stDocName As String
> Dim stLinkCriteria As String
> 'need to get this to open record clicked on don't know if it is
> DLookup or ?? 'stDocName = Me.OrderID.OrdersWDetails
> DoCmd.OpenForm stDocName, , , stLinkCriteria
>
> End Sub


I'm not sure I have this straight, so please check my understanding:

You have a main form named "OrdersWDetails" -- yes?

This form displays records containing a numeric OrderID field -- yes?

The OrderID field is a unique key to the records displayed by the main
form -- yes?

On that form, there's a subform -- yes?

On that subform, there's a list box named "List0" -- yes?

The list box's bound column holds OrderID values -- yes?

*IF* all that is true, then you can probably use code like this:

'----- start of suggested code -----
Private Sub List0_DblClick(Cancel As Integer)

Dim frm As Form

Set frm = Me.Parent

With frm.RecordsetClone
.FindFirst "OrderID = " & Me!List0
If .NoMatch Then
MsgBox "Order not found!"
Else
frm.Bookmark = .Bookmark
End If
End With

Set frm = Nothing

End Sub

'----- end of suggested code -----

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:19 AM
lmv's Avatar lmv
Guest
 
Posts: n/a
   
   
Re: Listbox dbl click

> You have a main form named "OrdersWDetails" -- yes?
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225
YES
> This form displays records containing a numeric OrderID field -- yes?

YES (OrderID is not a visible field)
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225

> The OrderID field is a unique key to the records displayed by the main
> form -- yes?

YES
> On that form, there's a subform -- yes?

YES
> On that subform, there's a list box named "List0" -- yes?

YES
> The list box's bound column holds OrderID values -- yes?

YES
SELECT Orders.OrderID, Orders.OrderDate, Orders.PurchaseOrderNumber,
qrySupplierIDLookup.SupplierName, Orders.RequestedBy FROM Orders LEFT JOIN
qrySupplierIDLookup ON Orders.SupplierID = qrySupplierIDLookup.SupplierID
ORDER BY Orders.PurchaseOrderNumber;
5 COLUMNS
0";0.7";0.8";2";0.7"

I tried the code as suggested and got Runtime Error 2452 invalid referance
to the parent property
Set frm = Me.Parent

I don't know what to try to fix it.

> *IF* all that is true, then you can probably use code like this:
>
> '----- start of suggested code -----
> Private Sub List0_DblClick(Cancel As Integer)
>
> Dim frm As Form
>
> Set frm = Me.Parent
>
> With frm.RecordsetClone
> .FindFirst "OrderID = " & Me!List0
> If .NoMatch Then
> MsgBox "Order not found!"
> Else
> frm.Bookmark = .Bookmark
> End If
> End With
>
> Set frm = Nothing
>
> End Sub
>
> '----- end of suggested code -----


Reply With Quote
  #4 (permalink)  
Old 28-Jul-2006, 08:19 AM
Dirk Goldgar's Avatar Dirk Goldgar
Guest
 
Posts: n/a
   
   
Re: Listbox dbl click

"lmv" wrote in message
news:12A7A8C1-FBDE-4778-A680-A0A7E675E6AE@microsoft.com
> I tried the code as suggested and got Runtime Error 2452 invalid
> referance to the parent property
> Set frm = Me.Parent


You should only get that error if the code is not executing on a
subform. Are you *sure* your listbox is on a subform, and not on the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225
main form? A subform, in this sense, is one that is displayed in a
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225
subform control on the parent form -- not just a standalone form that is
related to the main form somehow.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


Reply With Quote
  #5 (permalink)  
Old 28-Jul-2006, 08:19 AM
lmv's Avatar lmv
Guest
 
Posts: n/a
   
   
Re: Listbox dbl click

No I am not sure... but now I think (from your questions) it is on the main
form...
It is an unbound list box on a tab
tabSelectTransaction

Sorry, so can dbl clicking the item in the list open it within the main form?
lmv

"Dirk Goldgar" wrote:

> You should only get that error if the code is not executing on a
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225
> subform. Are you *sure* your listbox is on a subform, and not on the
> main form? A subform, in this sense, is one that is displayed in a
> subform control on the parent form -- not just a standalone form that is
> related to the main form somehow.
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>
> (please reply to the newsgroup)
>
>
>

Reply With Quote
  #6 (permalink)  
Old 28-Jul-2006, 08:19 AM
Dirk Goldgar's Avatar Dirk Goldgar
Guest
 
Posts: n/a
   
   
Re: Listbox dbl click

"lmv" wrote in message
news:994FC14C-A898-4EB9-A8B8-AE83150A7366@microsoft.com
> No I am not sure... but now I think (from your questions) it is on
> the main form...
> It is an unbound list box on a tab
> tabSelectTransaction
>
> Sorry, so can dbl clicking the item in the list open it within the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225
> main form?


Sure, it's even easier. Just change the code as follows:

'----- start of suggested code -----
Private Sub List0_DblClick(Cancel As Integer)

With Me.RecordsetClone
.FindFirst "OrderID = " & Me!List0
If .NoMatch Then
MsgBox "Order not found!"
Else
Me.Bookmark = .Bookmark
End If
End With

End Sub
'----- end of suggested code -----

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225

(please reply to the newsgroup)


Reply With Quote
  #7 (permalink)  
Old 28-Jul-2006, 08:19 AM
lmv's Avatar lmv
Guest
 
Posts: n/a
   
   
Re: Listbox dbl click

PERFECT... almost can you tell me how to send the focus back to:
tabOrderDetails

thank you! :~)

"Dirk Goldgar" wrote:

> "lmv" wrote in message
> news:994FC14C-A898-4EB9-A8B8-AE83150A7366@microsoft.com
> > No I am not sure... but now I think (from your questions) it is on
> > the main form...
> > It is an unbound list box on a tab
> > tabSelectTransaction
> >
> > Sorry, so can dbl clicking the item in the list open it within the
> > main form?

>
> Sure, it's even easier. Just change the code as follows:
>
> '----- start of suggested code -----
> Private Sub List0_DblClick(Cancel As Integer)
>
> With Me.RecordsetClone
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225
> .FindFirst "OrderID = " & Me!List0
> If .NoMatch Then
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225
> MsgBox "Order not found!"
> Else
> Me.Bookmark = .Bookmark
> End If
> End With
>
> End Sub
> '----- end of suggested code -----
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>
> (please reply to the newsgroup)
>
>
>

Reply With Quote
  #8 (permalink)  
Old 28-Jul-2006, 08:19 AM
Dirk Goldgar's Avatar Dirk Goldgar
Guest
 
Posts: n/a
   
   
Re: Listbox dbl click

"lmv" wrote in message
news:4ED2638D-C9BB-4BE5-8A82-31F724934AB9@microsoft.com
> PERFECT... almost can you tell me how to send the focus back to:
> tabOrderDetails


Is tabOrderDetails a tab control, or a page of a tab control?
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225

You could try this and see if it works:

Me.tabOrderDetails.SetFocus

You'd insert that line in the code after the With ... End With block,
before the End Sub line.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


Reply With Quote
  #9 (permalink)  
Old 28-Jul-2006, 08:19 AM
lmv's Avatar lmv
Guest
 
Posts: n/a
   
   
Re: Listbox dbl click

  Donate Today!  
NOW it is PERFECT!
thanks!

"Dirk Goldgar" wrote:

> "lmv" wrote in message
> news:4ED2638D-C9BB-4BE5-8A82-31F724934AB9@microsoft.com
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11225
> > PERFECT... almost can you tell me how to send the focus back to:
> > tabOrderDetails

>
> Is tabOrderDetails a tab control, or a page of a tab control?
>
> You could try this and see if it works:
>
> Me.tabOrderDetails.SetFocus
>
> You'd insert that line in the code after the With ... End With block,
> before the End Sub line.
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>
> (please reply to the newsgroup)
>
>
>

Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Gurbani Jukebox
Listen to Gurbani while surfing SPN!
» Active Discussions
sikhism Who is "Mohan"?
Today 06:52 AM
21 Replies, 319 Views
sikhism need urgent advice.......
Today 06:46 AM
6 Replies, 72 Views
sikhism ਨਾਮਾ
Today 06:37 AM
2 Replies, 45 Views
sikhism Sikh Diamonds Video...
Today 04:23 AM
6 Replies, 112 Views
sikhism Are Creator and Creation...
Today 01:30 AM
44 Replies, 2,833 Views
sikhism Herman Hesse,...
Today 00:54 AM
13 Replies, 225 Views
sikhism On a Scale of Most...
Yesterday 21:42 PM
30 Replies, 1,277 Views
sikhism I became victim by...
Yesterday 19:50 PM
0 Replies, 39 Views
sikhism How important is Matha...
By Ishna
Yesterday 19:05 PM
58 Replies, 1,026 Views
sikhism Sikh Books downloads
Yesterday 15:39 PM
2 Replies, 62 Views
sikhism Salok Sheikh Farid ji...
Yesterday 09:35 AM
0 Replies, 43 Views
sikhism In Punjab, three farmers...
Yesterday 05:36 AM
0 Replies, 45 Views
sikhism Supernatural Sikhs, what...
Yesterday 03:45 AM
19 Replies, 408 Views
sikhism Sukhmani Sahib Astpadi...
26-May-2012 22:57 PM
0 Replies, 46 Views
Do You Think You Are...
26-May-2012 09:59 AM
94 Replies, 8,258 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.2

All times are GMT +6.5. The time now is 07:18 AM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.44038 seconds with 30 queries