P
Peter Hallett
I have a form, frm_A, which has a sub-form, sfrm_B, which in turn features a
sub-sub-form, sfrm_C.
Sfrm_B is bound to a table containing a number of records and is related to
frm_A in the usual many-one relationship. Sfrm_B also features a standard
Access navigation bar. However, when frm_A is opened, even though the
navigation bar on sfrm_B recognizes the many records to which sfrm_B is
bound, and works apparently normally, the ‘of N’ clause does not appear. For
example, with say 8 records, the bar initially shows record 1 and the buttons
can be clicked to reveal each record in turn, either forward or backward.
However, not until record No. 8 is reached does the phrase ‘of 8’ appear.
Once displayed, though it remains visible. A quicker way of revealing it is
to click the last record button.
I have encountered this problem before, in other circumstances, and used a
pair of ‘GoToRecord , , acFirst’ and ‘GoToRecord , , acLast’ commands to
force the display of the ‘of N’ clause. This time, however, it does not
work. If the commands are issued in Sub Form_Open or Sub Form_Load, of
sfrm_B, they appear to do nothing (confirmed by just issuing the ‘GoToRecord
, , acLast’ command) but they do work if issued in Sub Form_Current.
Unfortunately, however, they are of no use there. Sub Form_Current is
re-invoked every time a navigation button is clicked with the result that the
currently displayed record cannot be changed. I could possibly get around
this by writing some code to ensure that the ‘GoToRecord’ pair is only
invoked on the first entry to Sub Form_Current but by that stage the whole
work-around is starting to look a bit clumsy. Is there is a simpler solution?
sub-sub-form, sfrm_C.
Sfrm_B is bound to a table containing a number of records and is related to
frm_A in the usual many-one relationship. Sfrm_B also features a standard
Access navigation bar. However, when frm_A is opened, even though the
navigation bar on sfrm_B recognizes the many records to which sfrm_B is
bound, and works apparently normally, the ‘of N’ clause does not appear. For
example, with say 8 records, the bar initially shows record 1 and the buttons
can be clicked to reveal each record in turn, either forward or backward.
However, not until record No. 8 is reached does the phrase ‘of 8’ appear.
Once displayed, though it remains visible. A quicker way of revealing it is
to click the last record button.
I have encountered this problem before, in other circumstances, and used a
pair of ‘GoToRecord , , acFirst’ and ‘GoToRecord , , acLast’ commands to
force the display of the ‘of N’ clause. This time, however, it does not
work. If the commands are issued in Sub Form_Open or Sub Form_Load, of
sfrm_B, they appear to do nothing (confirmed by just issuing the ‘GoToRecord
, , acLast’ command) but they do work if issued in Sub Form_Current.
Unfortunately, however, they are of no use there. Sub Form_Current is
re-invoked every time a navigation button is clicked with the result that the
currently displayed record cannot be changed. I could possibly get around
this by writing some code to ensure that the ‘GoToRecord’ pair is only
invoked on the first entry to Sub Form_Current but by that stage the whole
work-around is starting to look a bit clumsy. Is there is a simpler solution?