G
Guest
Greetings,
I have a form with a subform. The subform has custom navigation buttons,
i.e., "Previous Record", "Next Record", etc. I am using the subform's
onCurrent event property to enable/disable the navigation buttons with the
Recordsetclone property depending on the current record. Such as:
cmdPrevRec.Enabled = Me.CurrentRecord > 1
Here's the gotcha - the subform is not populated with data until the user
selects a value from a combo box on the main form. The subform's recordset
clone, therefore, has no data when the user opens the main form, triggering
an error in the code to enable/disable the subform's navigation buttons (Run
Time Error: '3021', to be exact). How can I trap or prevent this error from
occuring?
Any help will definitely be appreciated.
jn
I have a form with a subform. The subform has custom navigation buttons,
i.e., "Previous Record", "Next Record", etc. I am using the subform's
onCurrent event property to enable/disable the navigation buttons with the
Recordsetclone property depending on the current record. Such as:
cmdPrevRec.Enabled = Me.CurrentRecord > 1
Here's the gotcha - the subform is not populated with data until the user
selects a value from a combo box on the main form. The subform's recordset
clone, therefore, has no data when the user opens the main form, triggering
an error in the code to enable/disable the subform's navigation buttons (Run
Time Error: '3021', to be exact). How can I trap or prevent this error from
occuring?
Any help will definitely be appreciated.
jn