Need a way around opening form in acDialog mode

  • Thread starter Thread starter Diarmuid
  • Start date Start date
D

Diarmuid

Hi
I have database for timesheets. I have a form frmTimeSheet, with a sub
form - frmsubTimeDetails. frmsubTimeDetails is based on a snapshot of table
tabTimeDetails and does not allow changes. There are over 30 fields on
tabTimeDetails, so I only display 10 fields on frmsubTimeDetails. I have
cmdView which lets the user view the full Timedetail in another form -
frmTimePopup. frmTimePopup is unbound, I load the values into text boxes,
and then write back when the user clicks save.
With me so far? :) So this is my code in cmdView

vBookMark = Me.Bookmark

DoCmd.OpenForm stDocName, , , , , acDialog, stOpenArgs

Me.Requery ' Which will move back to
the first record in frmsubTimeDetails
Me.Bookmark = vBookMark ' Move to the record that was current
before cmdViewpressed

All works fine except for one thing. Within frmTimePopup, there is an
InvoiceID field. I'd like the user to be able to double click the InvoiceID,
to view the Invoice in frmInvoice. However, because I'm in acDialog mode,
frmInvoice appears behind frmTimePopup.
Any suggestions for a way around this? I'd like for frmTimePopup to be a
normal form, and when the user clicks Save, requery frmsubTimeDetails and
point back to the correct record.
Thanks
Diarmuid
 
Hello Diarmuid

If the reason you are using a modal form is to run the requery after the
form closes, you could do that from the Save button on the popup.

Ragnar
 
Hello Diarmuid,

If I understand correctly that you are failed to change the focus to
frmInvoice form, because the frmTimePoup is in acDialog mode. If I have
misunderstood, please feel free to let me know.

Based on my research, when a form is opened in acDialog mode, the form's
Modal and PopUp properties are set to Yes so that you must close the form
window before you can move the focus to another object.

Please try to use the following codes on the frmTimePopup form to disable
the Modal and PopUp properties.

Me.Modal = False
Me.PopUp = False

I am looking forward to hearing from you soon.
Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top