Two questions...
1) what are you doing with the me.base.setfocus statement?
I don't understand the Base property. what version of MS access are you using?
2) Does the control with name PartNo have focus when you run the above code? If so, it is losing focus when you move the focus to wherever its going. Jonathan
________________________________________
It is not fair to ask of others what you are unwilling to do yourself.
-Eleanor Roosevelt
Base is a field on the form. I first focus on it to capture the data to cut it down to size.
Then there are several lines of code it goes through.
It was working fine until I tried to add code to a different procedure for PartNo_LostFocus. I was doing a step process to watch it and it jumps right after that Me.Base.Setfocus line. So weird!
Mary
Rule 1: Don't sweat the small stuff.
Rule 2: EVERYTHING is small stuff!! X-)
Nevermind... I ran a compact and repair and seems to be working now. That was so weird. Now if I can only get my PartNo_LostFocus to run. Seems to get ignored. Mary
Rule 1: Don't sweat the small stuff.
Rule 2: EVERYTHING is small stuff!! X-)
As already noted, you need to review/understand the event sequence. When you do "set focus", SOMETHING already has the FOCUS. You need to "get out" of 'there' before you can go anywhere else. Hence "LOST_FOCUS" from SOMEWHERE. In this case, is is/was (obviously?) PartNo?
Dont feel to bad. WHOLE books (and NOT small ones) have been devoted to the event driven process.
MichaelRed
redmsp@erols.com
There is never time to do it right but there is always time to do it over
i 'HOPE' it doesn't "HARM" anthing for a while, because it (the functionality) is not going to change in the foressable future.;-)
MichaelRed
redmsp@erols.com
There is never time to do it right but there is always time to do it over
By changing the event from LostFocus to AfterUpdate, it seems to work one time until I save it. Then when I try testing again (new record and all), it doesn't work anymore.
My intent is to capture data in two variables and then if my blnUpdate variable is True, run a SQL statement using those two variables after an update has happened. Mary
Rule 1: Don't sweat the small stuff.
Rule 2: EVERYTHING is small stuff!! X-)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.