472,356 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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 12294
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.co.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...nice 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.co.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
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...
4
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...
1
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...
2
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...
1
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...
4
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...
2
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...
5
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...
3
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...

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.