19aa2 problem displaying specific record
Sign Up |  Live StatsLive Stats    Articles 37,330| Comments 177,232| Members 19,409, Newest tanu sandhu| Online 501
Home Contact
 (Forgotten?): 
    Ishmeet Singh - First Voice of India 2008 Winner
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Click Here to Register/Sign Up Daily Hukamnama Member Blogs Downloads Website Navigation Help Fonts Tags

problem displaying specific record

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 115 USD (23%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
problems deleting a specific record andriulli@gmail.com Information Technology 8 28-Jul-2006 08:42 AM
problem displaying specific record martin.ryan@esbi.ie Information Technology 0 28-Jul-2006 08:30 AM
Open subform to a specific record fabianjones@gmail.com Information Technology 0 28-Jul-2006 08:17 AM
RE: print a specific record Ofer Cohen Information Technology 0 28-Jul-2006 07:59 AM
Current record not displaying properly alaskahawk Information Technology 2 17-Nov-2005 18:02 PM


Tags
problem, displaying, specific, record
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:30 AM
MartinR's Avatar MartinR
Guest
 
Posts: n/a
   
   
problem displaying specific record

  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
Hi,
I have written this code below and it executes but does not do what I
want it to do. What I want is the form "Sparesform" to open when I
double click on the "index" field for the record I wish to view. The
index field is part of a subform. What is happening at the moment is
the form "Sparesform" is opening but does not go to the correct record
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/12605-problem-displaying-specific-record.html
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
but instead goes to, what appears to be a new record. My where
condition of the code appears to be assigning the correct index number
to "forms![sparesform]![number]" but this does not seem to be carried
out when the sparesform is opened.

Index is a numeric data type (ie its an auto number)
Can you shine some light on my problem.


Private Sub index_DblClick(Cancel As Integer)

Dim stDocName As String, stLinkCriteria As String

stDocName = "Sparesform"
stLinkCriteria = "forms![sparesform]![Number] = " & Me![index]

DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms![sparesform]![Condition].SetFocus

End Sub

Yours truly,
Martin R



Got anything to share on This Topic? Why not share your immediate thoughts/reaction with us! Login Now! or Sign Up Today! to share your views... Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:30 AM
Rick Brandt's Avatar Rick Brandt
Guest
 
Posts: n/a
   
   
Re: problem displaying specific record

MartinR wrote:
> Hi,
> I have written this code below and it executes but does not do what I
> want it to do. What I want is the form "Sparesform" to open when I
> double click on the "index" field for the record I wish to view. The
> index field is part of a subform. What is happening at the moment is
> the form "Sparesform" is opening but does not go to the correct record
> but instead goes to, what appears to be a new record. My where
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
> condition of the code appears to be assigning the correct index number
> to "forms![sparesform]![number]" but this does not seem to be carried
> out when the sparesform is opened.
>
> Index is a numeric data type (ie its an auto number)
> Can you shine some light on my problem.
>
>
> Private Sub index_DblClick(Cancel As Integer)
>
> Dim stDocName As String, stLinkCriteria As String
>
> stDocName = "Sparesform"
> stLinkCriteria = "forms![sparesform]![Number] = " & Me![index]
>
> DoCmd.OpenForm stDocName, , , stLinkCriteria
> Forms![sparesform]![Condition].SetFocus
>
> End Sub
>
> Yours truly,
> Martin R


Your where clause does not need to refer to the form like that (the form
knows who it is). Just use...
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605

stLinkCriteria = "[Number] = " & Me![index]

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:30 AM
MartinR's Avatar MartinR
Guest
 
Posts: n/a
   
   
Re: problem displaying specific record

cheers for the advice but when i changed that, a message box comes up
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
prompting me to enter a number, when i put in a number it still does
not open the record with that index number but instead it opened the
first record! i dont want to have to enter in the number if i am
clicking on the one that i want to go to. Do you think my code is wrong?
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605

Reply With Quote
  #4 (permalink)  
Old 28-Jul-2006, 08:30 AM
Rick Brandt's Avatar Rick Brandt
Guest
 
Posts: n/a
   
   
Re: problem displaying specific record

MartinR wrote:
> cheers for the advice but when i changed that, a message box comes up
> prompting me to enter a number, when i put in a number it still does
> not open the record with that index number but instead it opened the
> first record! i dont want to have to enter in the number if i am
> clicking on the one that i want to go to. Do you think my code is
> wrong?

Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605

Yep. When you are prompted for a field it usually means the field does not
exist or that you spelled it wrong.

Open the form normally to record one (no filter). Click into the [Number]
field and press the "Filter By Selection" button in the toolbar. That will
apply a filter that specifies the record that you are currently sitting on.
Now switch to design view and examine the filter string that was created by
what you just did. That is what the WHERE clause you are sending should
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
look like. Does it?

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Reply With Quote
  #5 (permalink)  
Old 28-Jul-2006, 08:30 AM
MartinR's Avatar MartinR
Guest
 
Posts: n/a
   
   
Re: problem displaying specific record

When i click the filter by selection button and then go into design
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
view, where do i view the code behind this??

Reply With Quote
  #6 (permalink)  
Old 28-Jul-2006, 08:30 AM
Rick Brandt's Avatar Rick Brandt
Guest
 
Posts: n/a
   
   
Re: problem displaying specific record

MartinR wrote:
> When i click the filter by selection button and then go into design
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
> view, where do i view the code behind this??


Just look at the Filter property of the form on the {Data} tab of the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
property sheet.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Reply With Quote
  #7 (permalink)  
Old 28-Jul-2006, 08:30 AM
MartinR's Avatar MartinR
Guest
 
Posts: n/a
   
   
Re: problem displaying specific record


Opposite filter lookup on the data tab it says Database Default. Is
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
this the setting i require?

Reply With Quote
  #8 (permalink)  
Old 28-Jul-2006, 08:31 AM
Rick Brandt's Avatar Rick Brandt
Guest
 
Posts: n/a
   
   
Re: problem displaying specific record

"MartinR" wrote in message
news:1152172057.102110.262860@m79g2000cwm.googlegr oups.com...
>
> Opposite filter lookup on the data tab it says Database Default. Is
> this the setting i require?


No. Make sure the property sheet is showing properties for the form (not an
object on the form) by clicking on the small gray square in the upper left
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
corner of the form in design view. On the {Data} tab the second item listed
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
should be the Filter property.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Reply With Quote
  #9 (permalink)  
Old 28-Jul-2006, 08:31 AM
MartinR's Avatar MartinR
Guest
 
Posts: n/a
   
   
Re: problem displaying specific record

  Donate Today!  
This is what it says in the filter part under the data tab.
((Spares.[No]=651))

What way should i now change my code?
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605

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

» Active Discussions
Man Driving Without...
Today 00:28 AM
3 Replies, 70 Views
Do you believe in...
Today 00:25 AM
192 Replies, 4,006 Views
Keeping Amrit Vela
Yesterday 23:38 PM
10 Replies, 850 Views
How does Sikhi help you...
Yesterday 22:54 PM
22 Replies, 875 Views
Losing My Religion: Why...
Yesterday 22:18 PM
12 Replies, 278 Views
Request for assistance...
Yesterday 21:53 PM
5 Replies, 48 Views
Panjabi
By Ishna
Yesterday 17:56 PM
12 Replies, 260 Views
Parkash Guru Amar Das ji...
Yesterday 17:07 PM
3 Replies, 33 Views
Serious challenges to...
Yesterday 16:49 PM
0 Replies, 66 Views
Sikh man fights for his...
Yesterday 16:46 PM
0 Replies, 62 Views
Sikhs Rights Group to...
Yesterday 16:44 PM
0 Replies, 39 Views
Haryana Sikh body bans...
Yesterday 16:39 PM
0 Replies, 42 Views
Health Exercise And...
Yesterday 13:30 PM
0 Replies, 55 Views
SSGS with English...
Yesterday 12:55 PM
9 Replies, 120 Views
Rozana Reports (ਪੰਜਾਬੀ...
Yesterday 01:44 AM
310 Replies, 7,560 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 01:01 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.72998 seconds with 32 queries
0