Access 2007 textbox not updating

J

jay.bryan

I'm not sure if this is the correct place to post, but here goes;

We are using Access 2007 and have a form with a text box which does an
automatic calculation. The code is placed in the control source of the
text box named "Remaining Seats" Here is the code

=IIf(IsNull([EventID]),0,[EventID].[Column](2)-DLookUp("[Number of
Registered Attendees]","Attendee Count by
Event","[EventID]=forms![Registration]![EventID]"))

This code works just fine on a PC running Windows XP Pro and Access
2007, but when we load the database on a PC running Windows Vista with
Access 2007, it seems to ignore the code and the textbox remains
blank.

We have set the trusted location for the database and I have even turn
off any macro security - the option that says run a macro anytime.
These settings seem to have no effect.

I have noticed that if I enable the textbox (we have it disabled to
keep the cursor from going to it) and the textbox gets focus, it does
the calculation.

Now why would it work on an XP box and not a Vista box with the same
version of Access? Any ideas will be greatly appreciated.

Jay Bryan
 
G

Guest

Jay,

Perhaps a couple of strategically placed me.recalc statements when data is
changed that may effect your calculated control will help.


swas
 
B

Bob Quintal

Instead of disabling the control, try setting its locked property
to yes. You can also prevent tabbing into a control by setting its
tab stop (on the other panel in the properties) to no.

One or both may workaround your problem.

Another thing to try may be to remove the calculation from the
recordsource, and setting the value from code.

The Event_Id_AfterUpdate and Form_Current events would be the
places to put it.

Me!Remaining_Seats= Iif(IsNull(.....

(e-mail address removed) wrote in
I'm not sure if this is the correct place to post, but here
goes;

We are using Access 2007 and have a form with a text box which
does an automatic calculation. The code is placed in the
control source of the text box named "Remaining Seats" Here
is the code

=IIf(IsNull([EventID]),0,[EventID].[Column](2)-DLookUp("[Number
of Registered Attendees]","Attendee Count by
Event","[EventID]=forms![Registration]![EventID]"))

This code works just fine on a PC running Windows XP Pro and
Access 2007, but when we load the database on a PC running
Windows Vista with Access 2007, it seems to ignore the code
and the textbox remains blank.

We have set the trusted location for the database and I have
even turn off any macro security - the option that says run a
macro anytime. These settings seem to have no effect.

I have noticed that if I enable the textbox (we have it
disabled to keep the cursor from going to it) and the textbox
gets focus, it does the calculation.

Now why would it work on an XP box and not a Vista box with
the same version of Access? Any ideas will be greatly
appreciated.

Jay Bryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top