I'm having troubles maximilizing after a query..

JvM

Registered User.
Local time
Today, 23:12
Joined
Jan 7, 2003
Messages
68
Good afternoon,

In a form I let the user make some choices. They can push command buttons which start a query which show its results. They can close the query and have to see the form maximilized.

I've tried all kinds of command lines, Got focus, start, enz..

Does anybody know what I can do to keep my form maximilized?

Greetings,

Jan
 
On the Form_Activate() event (in the VB window)

Docmd.Maximize
 
Hallo,

Thanks but I've done that all ready, it keeps resizing it..

After the query opens en you close it. The window stays small.

But never the less thank you for bringing up an idea.. may bey you know an other sollution?

Greetings,

Jan
 
Works fine for me. Have you some other code on the form that tells the form to

docmd.restore
 
Well I can't find it, but here is the whole code of the page. Maybey you can find what I did wrong?

Option Compare Database
Option Explicit

Private Sub Bijschrift40_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Me.Bijschrift40.ForeColor <> 14079 Then
Me.Bijschrift40.ForeColor = 14079
End If
End Sub

Private Sub Bijschrift41_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Me.Bijschrift41.ForeColor <> 14079 Then
Me.Bijschrift41.ForeColor = 14079
End If
End Sub
Private Sub Bijschrift42_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Me.Bijschrift42.ForeColor <> 14079 Then
Me.Bijschrift42.ForeColor = 14079
End If
End Sub

Private Sub Bijschrift47_Click()
On Error GoTo Err_Bijschrift47_Click

Dim stDocName As String
Dim stLinkCriteria As String
DoCmd.Close
stDocName = "Debiteuren_informatie"
DoCmd.OpenForm stDocName, , , stLinkCriteria


Exit_Bijschrift47_Click:
Exit Sub

Err_Bijschrift47_Click:
MsgBox Err.Description
Resume Exit_Bijschrift47_Click
End Sub

Private Sub Bijschrift47_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Me.Bijschrift47.ForeColor <> 14079 Then
Me.Bijschrift47.ForeColor = 14079
End If
End Sub

Private Sub Details_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Me.Bijschrift47.ForeColor <> 4215893 Then Me.Bijschrift47.ForeColor = 4215893
If Me.Bijschrift40.ForeColor <> 4215893 Then Me.Bijschrift40.ForeColor = 4215893
If Me.Bijschrift41.ForeColor <> 4215893 Then Me.Bijschrift41.ForeColor = 4215893
If Me.Bijschrift42.ForeColor <> 4215893 Then Me.Bijschrift42.ForeColor = 4215893
End Sub

Private Sub Form_GotFocus()
DoCmd.Maximize
End Sub

Private Sub Form_Open(Cancel As Integer)
DoCmd.Maximize
End Sub


Private Sub Knop28_Click()
On Error GoTo Err_Knop28_Click


DoCmd.Quit

Exit_Knop28_Click:
Exit Sub

Err_Knop28_Click:
MsgBox Err.Description
Resume Exit_Knop28_Click

End Sub

Private Sub Bijschrift40_Click()
On Error GoTo Bijschrift40_Click_Err
MsgBox "Voer het debiteuren nummer in en de datum selectie, sluit af met een kruisje!!", vbInformation, ""

Call Shell("s:\commercie\rapportage\debiteur.bat", 1)
DoCmd.OpenQuery "debiteur invoer", acViewNormal, acEdit

Bijschrift40_Click_Exit:
Exit Sub

Bijschrift40_Click_Err:
MsgBox Error$
Resume Bijschrift40_Click_Exit

End Sub

Private Sub Bijschrift41_Click()
On Error GoTo Bijschrift41_Click_Err

MsgBox "Indien u op OK drukt worden de debiteur gegevens opgehaald, dit kan enkele minuten duren !!", vbInformation, ""
DoCmd.RunMacro "Download selectie", , ""
MsgBox "De gegevens zijn opgehaald, indien u op OK drukt, kunt u de rapporten op basis van de opgehaalde gegevens opstellen.", vbInformation, ""


Bijschrift41_Click_Exit:
Exit Sub

Bijschrift41_Click_Err:
MsgBox Error$
Resume Bijschrift41_Click_Exit

End Sub
Private Sub Bijschrift42_Click()
On Error GoTo Bijschrift42_Click_Err

MsgBox "Indien u op OK drukt worden de debiteur gegevens opgehaald, dit kan enkele minuten duren !!", vbInformation, ""
DoCmd.RunMacro "Download selectie_lev", , ""
MsgBox "De gegevens zijn opgehaald, indien u op OK drukt, kunt u de rapporten op basis van de opgehaalde gegevens opstellen.", vbInformation, ""


Bijschrift42_Click_Exit:
Exit Sub

Bijschrift42_Click_Err:
MsgBox Error$
Resume Bijschrift42_Click_Exit

End Sub
 
what do the macros

Download selectie
Download selectie_lev

Contain? I suspect this is the bit where you are running the queries. If they only run a query, use
Docmd.OpenQuery "QueryName" instead

The rest of your code does not seem to be the problem so I would look closer at these macros first.
 
These macro's export tables in a second acces dbase on our network to this dbase. With the first query you make a selection of our customer information. This information is then loaded to the tables in the user specific dbase so he can run some reports with them. They don't start any queries..

I'm looking for an answer for quit some time now. It doesn't interrupt the proces of the dbase . But this is a detail I myself find very desturbing when the rest works properly..

Isn't there a way to put in some vb so that all forms are always shown maximized?

Greetzz

Jan
 
I just spotted this on second looking. - Hard to pick out when I dont speak the language! - (and Google cannot translate!)

Call Shell("s:\commercie\rapportage\debiteur.bat", 1)
DoCmd.OpenQuery "debiteur invoer", acViewNormal, acEdit

I assume this is the query you are talking about?

Have you tried adding docmd.maximize after this event?
 
Last edited:
I just tried..

But it doesn't make a change..

I'll try altering things till it is good..

However thanks for the effort..

Greetings,

Jan
 

Users who are viewing this thread

Back
Top Bottom