Moving focus (1 Viewer)

rborob

Registered User.
Local time
Today, 15:57
Joined
Jun 6, 2006
Messages
116
Lo all,
ive got 2 list boxes in a form.
When you click on list it clears any selected rows in the other.

My problem is this:
I have a couple of text boxes above the list boxes which are used to change selected rows. I need to click the list box then move the focus one text box. Then i need to either change that value (its a % ) or just hit enter and move the focus to the second text box.

A problem occurs when i try to select a row in one list box, then select an item in the other.

I get a "cant move focus to control "text box name" "
ive tried moving the focus away then back but to no avail. has anyone else had this problem?

Can anyone help please?
 

Mile-O

Back once again...
Local time
Today, 23:57
Joined
Dec 10, 2002
Messages
11,316
Check the Enabled and Locked properties of your textbox. You can't set the focus to it if it's locked or disabled.
 

rborob

Registered User.
Local time
Today, 15:57
Joined
Jun 6, 2006
Messages
116
the control moves fine when im clicking items in the same listbox. however when i click to a different one i get that message. Hope this helps clarify..im stuuuuck!
 

Mile-O

Back once again...
Local time
Today, 23:57
Joined
Dec 10, 2002
Messages
11,316
Can you supply an example database as it's hard for me to truly understand the problem?
 

rborob

Registered User.
Local time
Today, 15:57
Joined
Jun 6, 2006
Messages
116
http://img249.imageshack.us/my.php?image=untitled1sh.png

maybe this will help..cant put the database on here since i cant seem to break it down into a small enough part. it also holds sensitive data. But ill explain...

Im trying to move the focus to txtPercentage which is under the "Percentage Calculator" label. this works while im clicking the items in the "original quotation" list. But if i click an item in The other list then try to reclick an item in the original list again..it comes up with a "cant move focus to control txtPercentage" error.

As an added note whenever i click an item in one list it clears any selected rows in the other table.

Hope this helps.
 

rborob

Registered User.
Local time
Today, 15:57
Joined
Jun 6, 2006
Messages
116
anyone know of a solution to this?...please?
 
Last edited:

rborob

Registered User.
Local time
Today, 15:57
Joined
Jun 6, 2006
Messages
116
im still stuck on this. I tried setting the focus to another textbox then on the focus of that moving it away to my target text box..to no avail. :(
 

modest

Registered User.
Local time
Today, 18:57
Joined
Jan 4, 2005
Messages
1,220
Can't help without seeing the official database (not a picture of). You should make a copy of the database, fill it with non-sensitive data, and then upload it as a zip file.
 

Bat17

Registered User.
Local time
Today, 23:57
Joined
Sep 24, 2004
Messages
1,687
which event are you running it from? beforeupdate could cause problems

Peter
 

Users who are viewing this thread

Top Bottom