Open Form at Maximum Size

G

Guest

I tried to enter the command, and I got an error and not effect -

Here is what is in my On Open event

Option Compare Database

Private Sub Command0_Click()
On Error GoTo Err_Command0_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Last Seven Days"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command0_Click:
Exit Sub

Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click

End Sub
Private Sub Command1_Click()
On Error GoTo Err_Command1_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Main Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command1_Click:
Exit Sub

Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click

End Sub
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click

Dim stDocName As String

stDocName = "Testing Data - Doctor's Visit - Last 90 Days"
DoCmd.OpenReport stDocName, acNormal

Exit_Command3_Click:
Exit Sub

Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click

End Sub
Private Sub Command12_Click()
On Error GoTo Err_Command12_Click


DoCmd.Quit

Exit_Command12_Click:
Exit Sub

Err_Command12_Click:
MsgBox Err.Description
Resume Exit_Command12_Click

End Sub

Private Sub Form_Open(Cancel As Integer)

End Sub

What's a person to do....
 
G

Guest

You need to put that code in EACH form's ON LOAD EVENT. Notice I didn't say
On OPEN event, I said On LOAD event. And it has to be on that event for each
form that you want to maximize when it opens up.
 
G

Guest

Bob -

You were very helpful to me. The inability to make this happen has driven
me nuts for years and years.

Please accept my sincere thanks personally.
 
G

Guest

Glad to hear that it worked out for you. Sometimes it is hard to actually
figure out what someone else is describing. I don't know if this would help
you at all, but I have several "Quick Tutorials" on my website and you might
find some that might help you for other things. It is at
http://www.btabdevelopment.com and select Quick Tutorials from the menu. I
also have a few sample databases there (planning on putting more up as well).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top