Link Individual forms from a list

G

Guest

Good morning,

I've a table in wich I have listed some animals, now I need to have a link
in each (like an Hyperlink) that will take me to a form I designed and where
I can see only one record at a time, this is, I want to link a table where I
list all the nimals, and when I click on animal A, it will take me to form
view of record of animal A.

I tried Macro Event on click and having the condition as:

[ID] = Forms![IndividualData]![ID]

this will take me to the first record, not to the specific record I clicked.

Probably this is really obvious, but have been blocked here for a while.

Thank you in advance.

Francisco Texieira
Universidade de Évora
 
A

Albert D. Kallal

when you want to display data in a continues, or grid like view, you have
several choices.

Here is some screen shots that will give you some ideas:

http://www.members.shaw.ca/AlbertKallal/Articles/Grid.htm

So, use the wizard to build a listbox on a form, or even a nice continuous
form. (in the wizard choose columnar form).

You can then add a single "button" to the continues form. The code behind
that button is:

docmd.OpenForm "frmEditDetails",,,"id = " & me!id
 
G

Guest

Albert, thank you so much for the quick reply, i did in fact used your code,
but I still get a messagebox asking me to enter the "parameter value" where
it appears the ID above a empty textbox, if I do some copy paste of the ID to
the textbox it will give me the record I'm looking for.

How can I fix this msgbox?
 
A

Albert D. Kallal

Your continues form is based on this table of animals.


Note that you MUST include the "id" from the table, as this is used to
identify the ONE record we will open the form to.

The form we open also must include this id field as part of the data source
(query, or table used for the fields in that form).

So, while you don't have to display the "id" field in the continues form,
you should for testing. The query used for that continues form MUST include
the id field as part of the query (you don't have to display the id, but it
has to be part of the query).

So, when you build the first continues form with the wizard, make sure you
include and display the "id" field as a column.

Then, bring up this continues form in design mode, and place a button on the
details section of the form.
I still get a messagebox asking me to enter the "parameter value" where
it appears the ID above a empty textbox

it sounds likely you have the "id" field correct, but the above prompt means
that you don't have the id field included in the form you trying to open.

That means either miss-typed the name of the pimary key field used to
identify the single record. (it not id, but some other name).
Or, this means you NOT included the id field in the target form you trying
to open (the target form is assume to be based on he SAME table, or query as
the continuous form. We talking about one table here...right?
 
G

Guest

It worked, thank you so much.

Albert D. Kallal said:
Your continues form is based on this table of animals.


Note that you MUST include the "id" from the table, as this is used to
identify the ONE record we will open the form to.

The form we open also must include this id field as part of the data source
(query, or table used for the fields in that form).

So, while you don't have to display the "id" field in the continues form,
you should for testing. The query used for that continues form MUST include
the id field as part of the query (you don't have to display the id, but it
has to be part of the query).

So, when you build the first continues form with the wizard, make sure you
include and display the "id" field as a column.

Then, bring up this continues form in design mode, and place a button on the
details section of the form.


it sounds likely you have the "id" field correct, but the above prompt means
that you don't have the id field included in the form you trying to open.

That means either miss-typed the name of the pimary key field used to
identify the single record. (it not id, but some other name).
Or, this means you NOT included the id field in the target form you trying
to open (the target form is assume to be based on he SAME table, or query as
the continuous form. We talking about one table here...right?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top