473,854 Members | 1,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing the current record when using continuous forms

aaj
Hi all

I have a small but rather annoying problem with continuos forms, and am
wondering if anyone can suggest a method of getting over it.

The front end is Access 2002 with the BE being SQL Server 2000.

I have a continuous bound form that is populated from a small recordset
when the form opens. The form has lots of other bits, but my problem is with
a single text box and an on-click event.

Within each record on the continuos form, a text box is bound to a field
called comments; next to each text box are a few different standard text
labels. This is repeated for each record within the recordset.

If the user clicks on the text string the text box is updated with the
relevant text string e.g.

Private Sub Label19_Click()
Me.hs_comments = "String 1"
End Sub

Private Sub Label20_Click()
Me.hs_comments = "String 2"
End Sub etc....

this works fine so long as the user has previousy clicked on the current
record to give it focus. If the user has been working on say record 1, and
then clicks on a label in record 2 hoping to update the contents of record
2, record 1 still has the focus and so its hs_comments box is updated rather
than the second records hs_comments box.

What I need to do is ensure that the record the label belongs to takes the
focus before the comments box is updated. I have tried using double click
and doevents but to no avail

any help would be most welcome

Thanks in advance

Andy
Nov 12 '05 #1
2 12564
TC
Well described.

I don't have Access here to check, but I think you'll find this tough to fix
if you keep using labels.

A label can be clicked (obviously), but it does not >accept the focus<, so
the focus remains on whatever record it was on before.You need the label's
click event to move the focus to the correct new record. You can move the
focus to any record using Recordstclone, bookmarks & Selheight. But the
problem is, knowing >which record< to move it to! The label's click event
just >does not know< which record was clicked.

I can think of a few very ugly ways around this. But it would be easier to
change the labels to a control that does accept the focus: eg. a textbox.
Then, when the user clicks the text in that box, the focus will move to that
record, & everything will work ok. You could perhaps even code a MouseMove
event for the textbox, to change the cursor from the vertical text-entry bar
(which is normally displayed for a textbox), back to the normall arrow, so
it looked just like the labels did.

HTH,
TC
"aaj" <a.*@c.com> wrote in message
news:3f******** *************** @news.easynet.c o.uk...
Hi all

I have a small but rather annoying problem with continuos forms, and am
wondering if anyone can suggest a method of getting over it.

The front end is Access 2002 with the BE being SQL Server 2000.

I have a continuous bound form that is populated from a small recordset
when the form opens. The form has lots of other bits, but my problem is with a single text box and an on-click event.

Within each record on the continuos form, a text box is bound to a field
called comments; next to each text box are a few different standard text
labels. This is repeated for each record within the recordset.

If the user clicks on the text string the text box is updated with the
relevant text string e.g.

Private Sub Label19_Click()
Me.hs_comments = "String 1"
End Sub

Private Sub Label20_Click()
Me.hs_comments = "String 2"
End Sub etc....

this works fine so long as the user has previousy clicked on the current
record to give it focus. If the user has been working on say record 1, and
then clicks on a label in record 2 hoping to update the contents of record 2, record 1 still has the focus and so its hs_comments box is updated rather than the second records hs_comments box.

What I need to do is ensure that the record the label belongs to takes the
focus before the comments box is updated. I have tried using double click
and doevents but to no avail

any help would be most welcome

Thanks in advance

Andy

Nov 12 '05 #2
aaj
That sounds like an excellent suggestion...ni ce lateral thought 8-)

many thanks

Andy

"TC" <a@b.c.d> wrote in message news:1069127711 .695655@teuthos ...
Well described.

I don't have Access here to check, but I think you'll find this tough to fix if you keep using labels.

A label can be clicked (obviously), but it does not >accept the focus<, so
the focus remains on whatever record it was on before.You need the label's
click event to move the focus to the correct new record. You can move the
focus to any record using Recordstclone, bookmarks & Selheight. But the
problem is, knowing >which record< to move it to! The label's click event
just >does not know< which record was clicked.

I can think of a few very ugly ways around this. But it would be easier to
change the labels to a control that does accept the focus: eg. a textbox.
Then, when the user clicks the text in that box, the focus will move to that record, & everything will work ok. You could perhaps even code a MouseMove
event for the textbox, to change the cursor from the vertical text-entry bar (which is normally displayed for a textbox), back to the normall arrow, so
it looked just like the labels did.

HTH,
TC
"aaj" <a.*@c.com> wrote in message
news:3f******** *************** @news.easynet.c o.uk...
Hi all

I have a small but rather annoying problem with continuos forms, and am
wondering if anyone can suggest a method of getting over it.

The front end is Access 2002 with the BE being SQL Server 2000.

I have a continuous bound form that is populated from a small recordset
when the form opens. The form has lots of other bits, but my problem is

with
a single text box and an on-click event.

Within each record on the continuos form, a text box is bound to a field
called comments; next to each text box are a few different standard text
labels. This is repeated for each record within the recordset.

If the user clicks on the text string the text box is updated with the
relevant text string e.g.

Private Sub Label19_Click()
Me.hs_comments = "String 1"
End Sub

Private Sub Label20_Click()
Me.hs_comments = "String 2"
End Sub etc....

this works fine so long as the user has previousy clicked on the current
record to give it focus. If the user has been working on say record 1, and then clicks on a label in record 2 hoping to update the contents of

record
2, record 1 still has the focus and so its hs_comments box is updated

rather
than the second records hs_comments box.

What I need to do is ensure that the record the label belongs to takes the focus before the comments box is updated. I have tried using double click and doevents but to no avail

any help would be most welcome

Thanks in advance

Andy


Nov 12 '05 #3

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

Similar topics

4
9804
by: Prakash Wadhwani | last post by:
I have 3 fields : First_Name, Last_Name & Policy_Number I'm using a continuous form. If I invoke conditional formatting on First_Name & set a condition of "Prakash" (change the foreground to red), it works fine. My Problem: ---------- What I'd like to do however is change the color of the foreground for
4
4166
by: DBQueen | last post by:
I have a subform which is in Continuous Forms view. I have added a button to the bottom of the page to move to the next record using the button wizard (result: DoCmd.GoToRecord , , acNext). I want all of the controls in whatever is the CURRENT record to have it's data bolded on the screen. (Question #1: Is there a SIMPLE way to refer to the Current Record?) I've been trying to use a Bookmark to specify the current record, but it
1
3210
by: Richard Coutts | last post by:
I have a Continuous Form where each record has a button that activates another form that simplifies entering values into the record. The activated form has the equivalent of a "Done" button. I'd like to write an OnClick event that populates the contents of the current record of the parent form with the values entered in the popup form. So, the activated form needs to set the values of the current record of the parent form. How do you...
2
1859
by: Melissa | last post by:
I have a single (not continuous) form with an Undo button for entering finished projects. On the form is also a subform that lists all finished projects for reference. When I enter the CompletionDate which is near the beginning of all the fields, I would like the current project to appear in the subform which lists all the finished projects. I can't save the current project at that point because I wouldn't be able to use the Undo button...
1
4449
by: phaddock4 | last post by:
Being fairly inexperienced at Access 2000, i've been reading many posts here for the last several days, and testing myself to find the best approach to do the following in A2K: SET UP: I have created a MainTable (and related form), which has an associated SubForm (popup) along with its underlying, separate Table. The tables' relationship is one to many respectively. The primary key
4
3145
by: Francis | last post by:
Hello i have a continuos form, and i have a command button to help insert information on a control textbox. But when the text box is not null, i dont want the command button to show (to the current record only). What is the code i shall use in the Current Event of Form, in order to display the command button for each record (for null related text boxes). Thanks in advance
2
1645
by: Bob | last post by:
I got three related datagrid views one parent and two children of the same. The two child tables contain many thousands of records and some of the contents are bitmap files in a sql server database. The default behaviour of loading all the contents of the parent data table and also all the related data is not acceptable, its takes too long to complete. What I need to do IMHO, is to load the parent table and after its loaded, and it gets...
5
7397
by: eighthman11 | last post by:
Hi everyone: This is probably a pretty simple problem but it is driving me nuts. Using Access 2000. I have a continuous form which list several thousand inventory items. The user can enter a order quantity on any given line. I have several different error checks depending on what the user enters in the quantity text box. What I need is a way to keep the user on that current record if he has any errors. This needs to be done if he...
3
2084
by: tombarth11 | last post by:
I have searched, but can't find a thread that addresses this problem. I think I'm just overlooking something simple, but I'm stumped at this time. My problem is that I need to provide a list of order numbers that are associated with a piece of equipment. I have a Form (frmEquipment) that is bound to a table (tblEquipment). I have another table (tblOrderNumbers) that contains, among other things, a Foreign Key field (called EqptKey) to...
0
9901
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
9751
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
10679
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10756
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
7081
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5741
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
5941
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4560
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3186
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.