473,387 Members | 1,407 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Getting the right record

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?

Nov 12 '05 #1
2 1370
"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


Nov 12 '05 #2
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

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: David Messner | last post by:
Ok I know this is simple but the statement eludes me... I have a date field where I want the default value on the data entry form's date field to be the last date entered. I figure I can do this...
5
by: Thelma Lubkin | last post by:
I have a form/subform with the common one-to-many relationship. The form allows user to display records and move to other records via the selector, to add,delete, and edit them, with the related...
17
by: Arnold | last post by:
Is using fseek and ftell a reliable method of getting the file size on a binary file? I thought I remember reading somewhere it wasn't... If not what would be the "right" and portable method to...
0
by: Lisa Jones | last post by:
Hi Has anyone see this problem in ADO.Net when deleting a record (assuming that the table has identity increment Index) result in getting wrong index key if right after adding the record the table...
1
by: julian_m | last post by:
I'm working with mysql without referential itegrity. Let me make some small example: tableA +-----------+---------------+ | id_1 | data_1 | +-----------+---------------+ | 1 ...
2
by: julian_m | last post by:
I'm working with mysql without referential itegrity. Let me make some small example: tableA +-----------+---------------+ | id_1 | data_1 | +-----------+---------------+ | 1 ...
12
by: Lennart Anderson | last post by:
I'm having a MySQl table wih a lot of information. I want to present some main fields in a table on one page. Each record do, of course, have a unique ID. The presnted table will have one field as...
9
by: KDawg44 | last post by:
Hi, I have PHP function that adds a record to the database. The table has an ID that is AUTO_INCREMENT. Is there anyway to get that ID back when I do any kind of insert? That ID is a foreign...
7
vikas251074
by: vikas251074 | last post by:
I am getting error above in following code since few days giving tension day and night. How can I solve this? I am facing since Oct.25. in line no. 362 After doing a lot of homework, I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.