PC Review


Reply
Thread Tools Rate Thread

Disabling fields with focus

 
 
=?Utf-8?B?TWF1cnkgTWFya293aXR6?=
Guest
Posts: n/a
 
      16th Jul 2007
I have a form with several subforms on it. When the main form's record is in
a certain state, I disable the various fields on the form and subform.

However, since the subforms get focus as well as the main form, when I go to
disable them I get an error saying you can't disable the field with focus.

I tried creating a hidden field, but for some reason I couldn't SetFocus to
it.

Is there a "best practice" solution to this?

Maury
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWF1cmljZQ==?=
Guest
Posts: n/a
 
      16th Jul 2007
Don't you have a button on your form? That's where I put the focus in a
situation like this. If you do want to use a hidden control place it under
the button or just place it in the form and set the properties to the color
of the form.

hth
--
Maurice Ausum


"Maury Markowitz" wrote:

> I have a form with several subforms on it. When the main form's record is in
> a certain state, I disable the various fields on the form and subform.
>
> However, since the subforms get focus as well as the main form, when I go to
> disable them I get an error saying you can't disable the field with focus.
>
> I tried creating a hidden field, but for some reason I couldn't SetFocus to
> it.
>
> Is there a "best practice" solution to this?
>
> Maury

 
Reply With Quote
 
=?Utf-8?B?TWF1cnkgTWFya293aXR6?=
Guest
Posts: n/a
 
      16th Jul 2007
"Maurice" wrote:

> Don't you have a button on your form?


Actually, no, the subforms are display only. But I'll add a hidden button
instead, that seems easy enough!

Maury
 
Reply With Quote
 
pietlinden@hotmail.com
Guest
Posts: n/a
 
      16th Jul 2007
On Jul 16, 9:44 am, Maury Markowitz
<MauryMarkow...@discussions.microsoft.com> wrote:
> I have a form with several subforms on it. When the main form's record is in
> a certain state, I disable the various fields on the form and subform.
>
> However, since the subforms get focus as well as the main form, when I go to
> disable them I get an error saying you can't disable the field with focus.
>
> I tried creating a hidden field, but for some reason I couldn't SetFocus to
> it.
>
> Is there a "best practice" solution to this?
>
> Maury


You would probably have to setfocus to another control on your form
and then disable whatever you wanted...

 
Reply With Quote
 
goode2fox
Guest
Posts: n/a
 
      26th Sep 2007
yup you have the to do that some computers do not work
"Maury Markowitz" <(E-Mail Removed)> wrote in
message news:E12B314A-D06C-4597-A716-(E-Mail Removed)...
> "Maurice" wrote:
>
> > Don't you have a button on your form?

>
> Actually, no, the subforms are display only. But I'll add a hidden button
> instead, that seems easy enough!
>
> Maury



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling Scroll Wheel when Access has Processing Focus =?Utf-8?B?SkFTZWxlcA==?= Microsoft Access VBA Modules 1 14th Jan 2005 08:40 PM
Disabling a control while it has the focus =?Utf-8?B?bmljaw==?= Microsoft Access Forms 6 9th Nov 2004 03:59 AM
Disabling Scroll-to-Focus with AutoScroll Ian Durkan via .NET 247 Microsoft Dot NET Framework Forms 0 15th Sep 2004 07:43 PM
Error 2164 - Disabling a control while it has focus. Stephan Ranocchia Microsoft Access Form Coding 1 10th Dec 2003 07:45 PM
Locking or Disabling Specific Records/ Set Focus dcardoza@gibbonslaw.com Microsoft Access Form Coding 1 1st Dec 2003 07:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:12 AM.