Link to home
Start Free TrialLog in
Avatar of aguilerad
aguilerad

asked on

Why can't I select/type into my subform?

I'm trying to get a database (which somebody else wrote) that's been running in Access 2003 to run in Access 2007.  The first thing I had to do was remove the reference to Utility.mda.  I mention that only in case it has something to do with my problem, which I can't see.

Now my problem is that I can't select a subform inside one of the forms.  It's not just that I can't change the data but that I can't actually click inside the subform - the cursor will never go there whether I click the subform or try to tab to it.  Visible, Enabled, AllowAdditions, AllowEdits, etc. in the subform are all set to true.

The record source is a table which I am able to edit when I open it directly.  I can even set a value in a field/control in the OnCurrent event of the subform.  However, I still can't click on or tab into the subform through the interface.

Any idea what is going on?

Thanks,
Dianne
Avatar of Yiogi
Yiogi

Perhaps the container within which you have your subform is disabled?
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Open up the VBA editor ... then:

from the menu:

Debug>>Compile

See if you get any errors ?

mx
<The first thing I had to do was remove the reference to Utility.mda>

Why

It could be that your subform is dependant on this reference.
Make sure that your subform's Master and Child links are set ... these are listed in the Data tab of the Properties dialog for the Subform control.
Avatar of aguilerad

ASKER

Thanks for the suggestions.

Yiogi:  The subform isn't in any container besides the (main) form

DatabaseMX:  No compile errors.  I also tried compiling in 2003 before re-opening in 2007 and also tried opening the db with the shift key down and then compiling - no errors.

LSMConsulting:  The Link Master Field and Link Child Field are set.

ldunscombe:  Based on my research online, I understand the utility.mda reference to be unnecessary in Access 2007 and the reference to it is a hold-over from earlier versions of Access.  If it is necessary and that's my problem, how do I determine what I need to change to fix it?  I'm out of debugging ideas.
You'd be much better of moving the db to 2007 by Importing everything into a new, blank 07 database. You can maintain the 03 format, if needed, but simply opening an 03 db in 2007 has been known to cause issues.
Wow, sounds like it's time to call Ghost Busters!

"If it is necessary and that's my problem, how do I determine what I need to change to fix it? "

Well, if it was necessary, then most likely you would have gotten compile errors, which you did not.

Can you upload to http://www.ee-stuff.com/Expert/Upload/upload.php ... removing any sensitive data of course?  

Then, provide me the link EE-Stuff gives you to the file location ... back here in this thread.

Note: There is a  2 MB upload limit.

mx
LSMConsulting:  I imported everything into a blank database (I tried both 2007 and 2003 formats in 2007) and I still have the same behavior.  

DatabaseMX:  I will have to clean the data but I will try uploading the db for your perusal.

Perhaps it's something obvious but I just want to understand what's going on.

Thanks for all of the suggestions so far.

Dianne
Yes ... clearly Evil Forces from Outer Space.  If you can upload, that would be great.

thx.mx
btw .. if Dianne = Female, your icon shows male ... just an fyi.  You can change that in your EE Account settings.

mx
The Evil Forces are not from Outer Space, it turns out.

There is a macro that fires in the BeforeUpdate event of the main form and it fires some other macros.  When I remove the call to the BeforeUpdate macro, I am able to click into the subform and type data into the subform fields.  

The macros work fine in 2003 but not in 2007 and I don't yet know why.  All they do is set the tax rate based on the date and then the subtotal and total fields; doesn't seem like a big deal.

Hopefully I'll be back to report that I figured it all out.
Access 2007 blocks some macros in the so called sandbox mode. Have a look at:
http://office.microsoft.com/en-us/access/HA012301901033.aspx
I still don't know why the macro was causing problems but removing it from the BeforeUpdate event of the main form allows me to make select the subform and enter data in it.  

Thanks for all of the suggestions along the way.
"Access 2007 blocks some macros "

Actually, where Microsoft refers to 'macros' related to the Sandbox issue, they are *actually* talking about VBA functions, not actual 'Macros'.  A VERY unfortunate choice of words.

mx
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial