Eljefegeneo
Still trying to learn
- Local time
- Yesterday, 19:38
- Joined
- Jan 10, 2011
- Messages
- 904
I have the following code that opens a form in a second DB to a specific record.
It works fine even if the second Access DB is open. It seems to want to open a second DB not maximized when another DB is open. That is, it only shows about half the page of the form. I have to click on the Maximize button in the upper right hand corner to get it to full size.
I want the second DB when it opens to show the form "frmSales" Maximized.
And I did try inserting the code to Maximize the form on load. No luck there either.
Code:
[I]'---Open related form in Main DB[/I]
Dim db2 As Object
Set db2 = GetObject("C:\Users\jbern\Desktop\Billing\DBMain.accdb", "Access.Application")
[I]'--close the LogIn Form so user does not have to log in[/I]
db2.DoCmd.Close acForm, "frmLogin"
[I]'Open the Main Menu so user can close the DB after they are finished[/I]
db2.DoCmd.OpenForm "frmOpenFirst3"
db2.DoCmd.OpenForm "frmSales"
db2.DoCmd.SelectObject acForm, "frmSales"
db2.DoCmd.Maximize
db2.Forms("frmSales").Filter = "[SequenceNumber] = " & Me.SequenceNumber
db2.Forms("frmSales").FilterOn = True
Set db2 = Nothing
I want the second DB when it opens to show the form "frmSales" Maximized.
And I did try inserting the code to Maximize the form on load. No luck there either.
Last edited: