Thanks - it's a text box (I din't want a command button as i wanted a neat
colour!) Anyway, point taken - double click is fine.
In the meantime I have been seeking a solution and come up with what I think
is a rather neat one. ..... using conditional format ..... the colour of the
box changes as the form is opened .. and for some reason it has the right
data. (I guess that in the process of altering the text box the relevant
record gets the focus.)
"Fletcher Arnold" <fl****@home.com> wrote in message
news:c1**********@hercules.btinternet.com...
"John M" <jo**@jmawer.demon.co.uk> wrote in message
news:c1*******************@news.demon.co.uk... Hi,
I have a continuous form which shows a record on each line. Further details are available by clicking on a box which runs code to open a further
form to give more details of the record. It works well. BUT you could well
have your cursor on one record and click on the box for extra details of
another. The result is that the details of the wrong record are displayed.
To find the right record I'm using
stLinkCriteria = "[PosId]=" & Me![PosID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
I guess I need a line of code which takes me to the relevant record
where the text box was clicked.
Any ideas?
Further details are available by clicking on a box ...
What is this 'box'? If you put the code, say, in the double-click event
of a texbox on the continuous form, you could guarantee getting the right
record.
Fletcher