1a22e problem displaying specific record
Sign Up |  Live StatsLive Stats    Articles 37,319| Comments 177,169| Members 19,407, Newest Jasbirsuropada| Online 536
Home Contact
 (Forgotten?): 
    Ishmeet Singh - First Voice of India 2008 Winner
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




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
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/12605-problem-displaying-specific-record.html
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
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.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605


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
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
> 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...

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
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
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?

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
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
> first record! i dont want to have to enter in the number if i am
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
> clicking on the one that i want to go to. Do you think my code is
> wrong?


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
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
view, where do i view the code behind this??
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605

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
> 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
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
this the setting i require?
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605

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
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
> 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
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.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12605
((Spares.[No]=651))

What way should i now change my code?

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
30 Day Amrit Vela -...
Yesterday 23:49 PM
45 Replies, 543 Views
How does Sikhi help you...
Yesterday 22:59 PM
19 Replies, 795 Views
What Do You Think of...
Yesterday 22:56 PM
39 Replies, 689 Views
Losing My Religion: Why...
Yesterday 22:47 PM
6 Replies, 146 Views
How Religions Change...
Yesterday 19:33 PM
0 Replies, 44 Views
Do you believe in...
Yesterday 12:00 PM
184 Replies, 3,878 Views
Thought of the Moment!
Yesterday 10:07 AM
109 Replies, 5,135 Views
Amrit
Yesterday 09:17 AM
5 Replies, 361 Views
What I believe Hukam to...
Yesterday 03:15 AM
13 Replies, 172 Views
Should SPN Keep the...
Yesterday 02:02 AM
19 Replies, 609 Views
Rozana Reports (ਪੰਜਾਬੀ...
Yesterday 01:46 AM
304 Replies, 7,492 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Yesterday 01:18 AM
173 Replies, 4,410 Views
Student Compares Toilet...
Yesterday 01:05 AM
1 Replies, 98 Views
Map shows world's 'most...
20-May-2013 18:58 PM
16 Replies, 290 Views
BHOOTS (Ghosts) and...
20-May-2013 13:08 PM
102 Replies, 13,896 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 00:09 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.43806 seconds with 32 queries
0