Question : Datasheet Dialog possible?



My code contains this sequence:


            DoCmd.OpenForm "fm_Resolver_Spouse", acFormDS, , "ContactID = " & !ContactID & " OR ContactID = " & !Spouse_ID, acFormEdit, acDialog

            answer = MsgBox("Proceed ?", vbOKCancel)
            If answer = vbCancel Then Exit Sub


The form's properties are Modal = Yes, and Pop Up = Yes, Default View = Datasheet, Allow Form View = No, Allow Datasheet View = Yes, Allow Layout View = No

I would expect the MsgBox to appear after the form is closed (Modal/Dialog), but the MsgBox appears on top of the form, immediately after the form is loaded.

I used to have the form Continuous, and it worked as expected, but when I changed it to Datasheet, this problem appeared.  Is it because Datasheet View cannot be used as Dialog, or something I'm missing?

Answer : Datasheet Dialog possible?

Another alternative would be to imbedd your datasheet as a subform within a larger form that only has the ContactID in the recordsource.  Then use the master/child relationship to link the wrapper form to the subform, which contains you datasheet as the subform.
Random Solutions  
 
programming4us programming4us