A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Go to specific record on form



 
 
Thread Tools Display Modes
  #1  
Old October 29th, 2009, 07:44 PM posted to microsoft.public.access.forms
Meaghan S
external usenet poster
 
Posts: 7
Default Go to specific record on form

Hi

Let's say I have a form with a subform where one can enter information
about about magazine articles into my database. I also have another
form, (datasheet view) based on the results of a parameter query, that
shows a list of records matching the criteria of the query. This form
is read-only. Is there a way for me to go to a specific record on the
data-entry form by selecting one of the records from the list on the
datasheet form by linking the ID number? (I know how to get to a
specific numbered record, but how do I get to the record specified by
the ID key?)

Thanks,

M
  #2  
Old October 29th, 2009, 11:10 PM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Go to specific record on form

Create a text box on form where you want to locate the record and set the
Visible property to No.
I would use a double click event on the ID key text box to call a macro with
following actions.
- SetValue the invisible text box created above using expression
[Forms]![YourMainForm]![SubForm]![ID Key Text Box]
- GoToControl where you will find the record matching ID key.
- FindRecord using 'Find What' of the invisible text box.
- SetValue the invisible text box to Null.

--
Build a little, test a little.


"Meaghan S" wrote:

Hi

Let's say I have a form with a subform where one can enter information
about about magazine articles into my database. I also have another
form, (datasheet view) based on the results of a parameter query, that
shows a list of records matching the criteria of the query. This form
is read-only. Is there a way for me to go to a specific record on the
data-entry form by selecting one of the records from the list on the
datasheet form by linking the ID number? (I know how to get to a
specific numbered record, but how do I get to the record specified by
the ID key?)

Thanks,

M
.

  #3  
Old October 30th, 2009, 01:25 AM posted to microsoft.public.access.forms
Meaghan S
external usenet poster
 
Posts: 7
Default Go to specific record on form

Hmm, I tried this, and found that the GoToControl doesn't work on a
control that is not visible...

On Oct 29, 4:10*pm, KARL DEWEY
wrote:
Create a text box on form where you want to locate the record and set the
Visible property to No.
I would use a double click event on the ID key text box to call a macro with
following actions.
- SetValue the invisible text box created above using expression *
[Forms]![YourMainForm]![SubForm]![ID Key Text Box]
- GoToControl where you will find the record matching ID key.
- FindRecord using 'Find What' of the invisible text box.
- SetValue the invisible text box to Null.

--
Build a little, test a little.

"Meaghan S" wrote:
Hi


Let's say I have a form with a subform where one can enter information
about about magazine articles into my database. I also have another
form, (datasheet view) based on the results of a parameter query, that
shows a list of records matching the criteria of the query. This form
is read-only. Is there a way for me to go to a specific record on the
data-entry form by selecting one of the records from the list on the
datasheet form by linking the ID number? (I know how to get to a
specific numbered record, but how do I get to the record specified by
the ID key?)


Thanks,


M
.


  #4  
Old October 30th, 2009, 02:53 PM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Go to specific record on form

Ok, make it visible but transparent with all colors the same as the
background and sized verry, very small in a corner and behind something else.
--
Build a little, test a little.


"Meaghan S" wrote:

Hmm, I tried this, and found that the GoToControl doesn't work on a
control that is not visible...

On Oct 29, 4:10 pm, KARL DEWEY
wrote:
Create a text box on form where you want to locate the record and set the
Visible property to No.
I would use a double click event on the ID key text box to call a macro with
following actions.
- SetValue the invisible text box created above using expression
[Forms]![YourMainForm]![SubForm]![ID Key Text Box]
- GoToControl where you will find the record matching ID key.
- FindRecord using 'Find What' of the invisible text box.
- SetValue the invisible text box to Null.

--
Build a little, test a little.

"Meaghan S" wrote:
Hi


Let's say I have a form with a subform where one can enter information
about about magazine articles into my database. I also have another
form, (datasheet view) based on the results of a parameter query, that
shows a list of records matching the criteria of the query. This form
is read-only. Is there a way for me to go to a specific record on the
data-entry form by selecting one of the records from the list on the
datasheet form by linking the ID number? (I know how to get to a
specific numbered record, but how do I get to the record specified by
the ID key?)


Thanks,


M
.


.

  #5  
Old October 30th, 2009, 09:37 PM posted to microsoft.public.access.forms
Meaghan S
external usenet poster
 
Posts: 7
Default Go to specific record on form


Ok, so I figured it out without making it as complicated as the below
option. I thought I would post it, just in case somebody has a similar
need:

-make sure that you have the ID# on the edit form. (this can be set to
visibility=0 if you don't want people to see it)
-create a filter (query) that selects the ID# field from the article
with the condition set to the CONTROL value of the form you want to
link from. Give the filter a name.
-use the double-click event to create a macro on the field you want
to create the event. (I used the ID field on my form) simply use, OPEN
FORM. Set the filter name to your above selection.

this allows you to double click on the ID of a record on one form, and
it will take you to the specific filtered result on another form.
 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:44 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.