473,805 Members | 2,077 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1395
"John M" <jo**@jmawer.de mon.co.uk> wrote in message
news:c1******** ***********@new s.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.co m> wrote in message
news:c1******** **@hercules.bti nternet.com...
"John M" <jo**@jmawer.de mon.co.uk> wrote in message
news:c1******** ***********@new s.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
12485
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 with a query but don't know what the criteria needs to be. Any help would be appreciated, Thanks
5
2258
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 records displayed in the subform going along for the ride. The parent form's recordset has fields string integer COLORNAME CLASSSIZE and a few more that aren't relevant here.
17
16011
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 obtain it? Thanks.
0
1111
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 query for the added recorded Index key. Anyone knows what would be the best way to solve this problem Clearing dataset and refilling it won’t work if you are using web services. Any suggestion or help will be highly appreciated Thank Lisa...
1
3529
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 | bla1 | | 2 | bla2 | | 3 | bla3 |
2
4010
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 | bla1 | | 2 | bla2 | | 3 | bla3 |
12
1766
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 a linked field. I want to be able to click this link, retreive the ID information for that record and then present detailed data for that record on the next page. How do I retreive the ID? Any hints are very much appreciated. Thanks
9
1759
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 key that I need to do an insert on afterwards. Thanks. Kevin
7
4448
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 surrendered to you. <%@ Language=VBScript%> <%Option Explicit%>
0
9716
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10609
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10366
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10105
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5542
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.