Moving focus

rborob

Registered User.
Local time
Today, 11:59
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?
 
Check the Enabled and Locked properties of your textbox. You can't set the focus to it if it's locked or disabled.
 
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!
 
Can you supply an example database as it's hard for me to truly understand the problem?
 
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.
 
anyone know of a solution to this?...please?
 
Last edited:
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. :(
 
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.
 
which event are you running it from? beforeupdate could cause problems

Peter
 

Users who are viewing this thread

Back
Top Bottom