Prev: 'Time Picker'
Next: Image Display Problem !
From: Doug on 9 Apr 2010 22:24 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
From: Tom van Stiphout on 10 Apr 2010 00:39 On Fri, 9 Apr 2010 19:24:35 -0700 (PDT), Doug <jerrabomberra(a)gmail.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 >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
|
Pages: 1 Prev: 'Time Picker' Next: Image Display Problem ! |