Access shutdown

  • Thread starter Thread starter RipperT
  • Start date Start date
R

RipperT

I have a main form and a subform and have arranged the
tab order to tab through the main form fields, then the
sub form fields. I had this working perfectly once. When
the last subform field was reached it returned to the
first field of the main form, but now, when I tab to the
end of the last subform field, Access "encounters a
problem and needs to shut down. We're sorry for the
inconvenience." Send/Don't send error report blah blah...
I've tried removing some tab stops and changing tab
indexes, and this alleviates the shutdown problem, but
causes the tabs to skip around erratically. What did I do
to hose this up?

Thanx,

Rip
 
Rip,

Do you have any macro or VBA procedure, on the Exit or some such event
of the last control on the subform, which causes the focus to move back
to the parent form?
 
It is an expression that figures the number of days
between the two dates entered in the two previous fields.
(not based on any data in the parent form)
Looks like this:

=DateDiff("d",[Sanction_st],[Sanction_rel])

I have removed the tab stop from this field and
the 'shutdown error' is gone and the focus goes back to
the first field of the parent form, however, this time
around, upon tabbing into the subform, the tab moves
directly to the field just BEFORE the the field from
which I removed the tab stop, instead of moving through
each field in succession as it did before.

I'm stumped. Thanx for your help.

Rip
 
Rip,

Just trying to get a picture of what's actually happening here, I'm
trying to find out what's causing the focus to move back to the parent
form from the subform. Normally it is not possible to "tab" from a
subform to a parent form, so there has to be a macro or VBA procedure
somewhere that makes this happen.
 
Not to be argumentative, but when it was working
correctly, the tab did move back into the parent form
(next record), through the parent form fields, onto the
subform fields, back to the parent and so on. I'm no
Access expert, but maybe this happened because the two
are linked by a couple of master and child fields?
Anyway, I got tired of dealing with the whole thing, so I
simply re-created the two forms and it works fine now.
But now I'm nervous. If it is 'normally not possible',
does this mean I just got lucky and it's probably going
to hose up on me again?

Thanx for the MVP help,

Rip
-----Original Message-----
Rip,

Just trying to get a picture of what's actually happening here, I'm
trying to find out what's causing the focus to move back to the parent
form from the subform. Normally it is not possible to "tab" from a
subform to a parent form, so there has to be a macro or VBA procedure
somewhere that makes this happen.

--
Steve Schapel, Microsoft Access MVP
It is an expression that figures the number of days
between the two dates entered in the two previous fields.
(not based on any data in the parent form)
Looks like this:

=DateDiff("d",[Sanction_st],[Sanction_rel])

I have removed the tab stop from this field and
the 'shutdown error' is gone and the focus goes back to
the first field of the parent form, however, this time
around, upon tabbing into the subform, the tab moves
directly to the field just BEFORE the the field from
which I removed the tab stop, instead of moving through
each field in succession as it did before.

I'm stumped. Thanx for your help.

Rip
.
 
Rip,

I am not sure where we are "missing" each other in our meaning. I was
not disputing that you could tab back to the main form from the subform.
However, this does not happen by default. There has to be a macro or
VBA procedure written in your subform to make this happen. There are
several variations on the theme of how to do this, for example using the
LostFocus event of the last control in the subform's tab order, or the
Enter event of a hidden control on the subform. You can use Ctrl-Tab to
move the focus back to the main form from the subform. Otherwise just
using Enter or Tab within the subform will keep you in the subform
forever. So your statement that you re-created the forms (main form and
subform) and now it works, is very strange to me. As far as I know, the
only way it can "work", in the sense you have been talking about, is if
you explicitly make it happen via macro or code.
 
Back
Top