Odd subform behavior

Archie999

Access Wannabee
Local time
Today, 05:46
Joined
May 25, 2003
Messages
45
Hi All,

I having a problem that is causing much grief because I can't understand what is happening. I don't get the logic here.

I have a form with a subform. The subform is displayed in datasheet view.

I want to make the entire form (inc subform) read-only unless a user clicks a button. To that end I set the form properties for both form and subform to not allow edits or deletions.

When I open the form and try to edit a field in the main form, the value does change. Bad. The odd thing is that if I click info the subform I cannot edit and now when I click back into the main form again, I am now unable to make changes.

Why do I first have to click into the subform in order to make the main form 'obey' it's properties.

Thank you very much for your thoughts!

Arch
 
Not sure if this is your problem or not, but if u change the allow edits property u need to requery the form before it takes effect. Which i guess is what your doing by switching between the main and sub form...
 
Good thought

Well, it's a good thought and good to know... but when I first open the form I have not actually changed the properties of the form yet. It's just the default form properties.

I added a requery on my form current event just to be sure and it made no difference.

Thanks
 
That is strange... I just tested this quickly and it worked properly for me.

Perhaps there's some other setting there somewhere that's conflicting? Not sure.
U could try re-creating the main form, see if it works then? Or do a quick test on a new form and if that works compare the settings?
 
I'll Play With It

Yeah, good call.

I copied my main form to a new form and removed ALL code behind it and it worked just fine. So something in my code is causing this.

I need to take a close look at what is happening in my code.

Thanks for pointing me in the right direction.

Arch
 
Found it

I had a bad query attached to one of my bound comboboxes in my main form and this was the reason my allowedit property was not working.

Go figure. It is nothing really related to the problem but little things like that can have bizarro implications.

Thanks again

Arch
 

Users who are viewing this thread

Back
Top Bottom