Hi,
I have placed a command button in one form that when pushed, brings up a different relevant form. The new form pops up behind the current form, but I would like for it to show up in front of the current form instead. How do I do that?
Hi,
I have placed a command button in one form that when pushed, brings up a different relevant form. The new form pops up behind the current form, but I would like for it to show up in front of the current form instead. How do I do that?
Use the acDialog parameter.
Hi,
I'm not very good with Access. Could you spell out what I need to do?
Post the code you have to open the other form.
Private Sub CustForm_Click()
On Error GoTo Err_CustForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Customers"
stLinkCriteria = "[Customer]=" & "'" & Me![Customer] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_CustForm_Click:
Exit Sub
Err_CustForm_Click:
MsgBox Err.Description
Resume Exit_CustForm_Click
End Sub
This should do it:
Code:Private Sub CustForm_Click() On Error GoTo Err_CustForm_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "Customers" stLinkCriteria = "[Customer]='" & Me![Customer] & "'" DoCmd.OpenForm stDocName, , , stLinkCriteria, , acDialog Exit_CustForm_Click: Exit Sub Err_CustForm_Click: MsgBox Err.Description Resume Exit_CustForm_Click End Sub
Thank you! Not sure I would have ever figured that out, but knew it had to be something simple. Thanks again!
You're very welcome. If you highlight OpenForm and hit F1, the VBA help will show you all of the options.