dbTalk Databases Forums  

go to a particular record in a form

comp.databases.ms-access comp.databases.ms-access


Discuss go to a particular record in a form in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Doug
 
Posts: n/a

Default go to a particular record in a form - 04-09-2010 , 09:24 PM






Hi I have a help desk database that is populated by a user form in ms
access 2003. The form has a text box that users can identify if the
current request is similar to another request - for example request
1302 has a text box callled tbrRelatedTopic that a user might type
value 1234 (for relatonship to requrest 1234). The request numbers
are unique but sometimes a request is deleted or created in error and
then removed.

I would like to allow help desk staff to double click on
tbRelatedTopic to take them to the request number that is in that text
box. I got this to work - sort of - using gotoRecord but this didnt
go to the request number - rather it seems that it went to the record
number in the table. so I tried acfindRecord but I dont know how to
get the input for the find to read from the related field but then
search the tbRequestNumber field for the record related to the topic.

As I mentioned, I am using access 2003. I am ok with VBA and I can
get the value from the tbRelatedTopic to be returned in a message box
when i have tested the double click on the text box - but just not
sure how to go to a specific request.

I dont know how clear this is - but maybe another way to explain the
problem is:
if i have a form that has 3 boxes - tbIceCreamType, tbMainFlavor, and
tbSimilarFlavor - when a user double clicks on the tbSimilarFlavor - I
would like to bring up a record that has that same flavour in the
tbMainFlavor records.

thanks

doug

Reply With Quote
  #2  
Old   
Tom van Stiphout
 
Posts: n/a

Default Re: go to a particular record in a form - 04-09-2010 , 11:39 PM






On Fri, 9 Apr 2010 19:24:35 -0700 (PDT), Doug
<jerrabomberra (AT) gmail (DOT) com> wrote:

I have my doubts about your design. It seems to me one request can be
related to many requests, not just one.
Anyway. to do what you want use the bookmark technique. Something like
this:
with me.recordsetclone
.findfirst "RequestNo=" & Me.txtRelatedTopic
if .nomatch then
msgbox "Arrcchh, Request not found!", vbCritical
else
me.bookmark = .bookmark
end if
end with

Note that the IF clause should never happen if you have the correct
referential integrity in place. You need a self-join between RecordNo
and RelatedRecordNo.

-Tom.
Microsoft Access MVP


Quote:
Hi I have a help desk database that is populated by a user form in ms
access 2003. The form has a text box that users can identify if the
current request is similar to another request - for example request
1302 has a text box callled tbrRelatedTopic that a user might type
value 1234 (for relatonship to requrest 1234). The request numbers
are unique but sometimes a request is deleted or created in error and
then removed.

I would like to allow help desk staff to double click on
tbRelatedTopic to take them to the request number that is in that text
box. I got this to work - sort of - using gotoRecord but this didnt
go to the request number - rather it seems that it went to the record
number in the table. so I tried acfindRecord but I dont know how to
get the input for the find to read from the related field but then
search the tbRequestNumber field for the record related to the topic.

As I mentioned, I am using access 2003. I am ok with VBA and I can
get the value from the tbRelatedTopic to be returned in a message box
when i have tested the double click on the text box - but just not
sure how to go to a specific request.

I dont know how clear this is - but maybe another way to explain the
problem is:
if i have a form that has 3 boxes - tbIceCreamType, tbMainFlavor, and
tbSimilarFlavor - when a user double clicks on the tbSimilarFlavor - I
would like to bring up a record that has that same flavour in the
tbMainFlavor records.

thanks

doug

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.