dbTalk Databases Forums  

access2007 docmd.maximize crashes

comp.databases.ms-access comp.databases.ms-access


Discuss access2007 docmd.maximize crashes in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Roger
 
Posts: n/a

Default access2007 docmd.maximize crashes - 11-08-2010 , 02:21 PM






I have a bound form with a docmd.maximize in the form open event, this
crashes the system, even though I have error handling - it's been
working fine for years with access97

I tried it in the onActivate() event, same problem
its intermittent, decompile/compacting doesn't help
it happens with both the full and runtime versions, and many systems

I found some postings on google about this problem, but the only
solution appears to be replacing it with
DoCmd.MoveSize 0,0,4000,4000

I haven't found the access2007 'help' -> 'about' to see what SP I'm
running but hopefully that might help
If I comment out the docmd.maximize, a statement like
me.visible = true
also crashes

has anyone solved this without using moveSize ?

I attached stripped down VBA that shows the problem

Public Sub editBusiness(lngBusinessId As Long)
Dim frm As Form

On Error GoTo fErr
Set frm = New Form_frmBusiness <- this triggers the formOpen
event
fExit:
On Error Resume Next
Exit Sub

fErr:
errorLog "editBusiness " & lngBusinessId
Resume fExit
End Sub


frmBusinesness
---------------

Private Sub Form_Open(Cancel As Integer)
On Error Resume Next
loadForm 12456
end sub


Public Sub loadForm(lngBusinessId As Long, Optional lngContactId As
Long = -1)
Dim strSql As String
Dim rs As DAO.Recordset

On Error GoTo fErr
With Me
.AllowAdditions = False
.AllowDeletions = False
strSql = "1 = 2"
If (lngBusinessId = -1 And lngContactId <> -1) Then
lngBusinessId = Nz(DLookup("businessId", "tblContact",
"contactId = " & lngContactId), -1)
End If

If (lngBusinessId <> -1) Then
strSql = "businessId = " & lngBusinessId
End If

.RecordSource = "SELECT *" & _
" FROM tblBusiness" & _
" WHERE " & strSql
End With

DoCmd.Maximize <- this causes the crash
Detail.Visible = True
fExit:
On Error Resume Next
Exit Sub

fErr:
errorLog Me.name & ".loadForm " & lngBusinessId & " " &
lngContactId
Resume fExit
End Sub

Reply With Quote
  #2  
Old   
David-W-Fenton
 
Posts: n/a

Default Re: access2007 docmd.maximize crashes - 11-08-2010 , 02:58 PM






Roger <lesperancer (AT) natpro (DOT) com> wrote in
news:05e9ab7c-f9b4-4d9a-89e8-3b3d438c25f7 (AT) v28g2000prn (DOT) googlegroups.co
m:

Quote:
I have a bound form with a docmd.maximize in the form open event,
this crashes the system, even though I have error handling - it's
been working fine for years with access97
A couple of things:

1. remove both On Error Resume Next statements. Neither has any
effect whatsoever (the first is superseded by the call to a sub with
error handling, the second happens as the last line before exiting
the sub, where it can't have any effect, since there is no following
line that can produce an error), and both are mis-used in your code.

2. have you tried moving the DoCmd.Maximize to before you set the
Recordsource of your form? Or before you call LoadForm()? Or before
you open your new form instance? The point is, that DoCmd.Maximize
effects all windows that aren't PopUp windows, so you can call it
anywhere -- it doesn't apply to the specific object you're opening,
but to everything open in the MDI window (although, perhaps the
tabbed and split forms in A2007/2010 work differently?).

All that said, the first thing I'd check on is video drivers. This
is a classic kind of case where buggy/outdated video drivers have
often caused Access to crash in the past, so I'd check if moving the
Maximize command doesn't have any effect.

(my expectation is that if you move the Maximize to somewhere before
the setting of the Recordsource that you're going to get an error
when you set the Recordsource, or shortly thereafter)

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/

Reply With Quote
  #3  
Old   
Roger
 
Posts: n/a

Default Re: access2007 docmd.maximize crashes - 11-08-2010 , 03:28 PM



On Nov 8, 1:58*pm, "David-W-Fenton" <NoEm... (AT) SeeSignature (DOT) invalid>
wrote:
Quote:
Roger <lesperan... (AT) natpro (DOT) com> wrote innews:05e9ab7c-f9b4-4d9a-89e8-3b3d438c25f7 (AT) v28g2000prn (DOT) googlegroups.co
m:

I have a bound form with a docmd.maximize in the form open event,
this crashes the system, even though I have error handling - it's
been working fine for years with access97

A couple of things:

1. remove both On Error Resume Next statements. Neither has any
effect whatsoever (the first is superseded by the call to a sub with
error handling, the second happens as the last line before exiting
the sub, where it can't have any effect, since there is no following
line that can produce an error), and both are mis-used in your code.

2. have you tried moving the DoCmd.Maximize to before you set the
Recordsource of your form? Or before you call LoadForm()? Or before
you open your new form instance? The point is, that DoCmd.Maximize
effects all windows that aren't PopUp windows, so you can call it
anywhere -- it doesn't apply to the specific object you're opening,
but to everything open in the MDI window (although, perhaps the
tabbed and split forms in A2007/2010 work differently?).

All that said, the first thing I'd check on is video drivers. This
is a classic kind of case where buggy/outdated video drivers have
often caused Access to crash in the past, so I'd check if moving the
Maximize command doesn't have any effect.

(my expectation is that if you move the Maximize to somewhere before
the setting of the Recordsource that you're going to get an error
when you set the Recordsource, or shortly thereafter)

--
David W. Fenton * * * * * * * * *http://www.dfenton.com/
contact via website only * *http://www.dfenton.com/DFA/
I moved the docmd.maximize to the top of formOpen(), same problem

if I put a stop statement at the top of formOpen(), and stopped
execution, and 'x' out of access, it crashes too

if I put docmd.maximize at the top of editBusiness it doesn't crash

so the only things that I step through from there are
DoCmd.Maximize <- doesn't crash
Set frm = New Form_frmBusiness
Private Sub Form_Open(Cancel As Integer)
DoCmd.Maximize <- crashes


I will check the video drivers and the access SP's

Reply With Quote
  #4  
Old   
Roger
 
Posts: n/a

Default Re: access2007 docmd.maximize crashes - 11-08-2010 , 04:52 PM



On Nov 8, 2:28*pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:
Quote:
On Nov 8, 1:58*pm, "David-W-Fenton" <NoEm... (AT) SeeSignature (DOT) invalid
wrote:





Roger <lesperan... (AT) natpro (DOT) com> wrote innews:05e9ab7c-f9b4-4d9a-89e8-3b3d438c25f7 (AT) v28g2000prn (DOT) googlegroups.co
m:

I have a bound form with a docmd.maximize in the form open event,
this crashes the system, even though I have error handling - it's
been working fine for years with access97

A couple of things:

1. remove both On Error Resume Next statements. Neither has any
effect whatsoever (the first is superseded by the call to a sub with
error handling, the second happens as the last line before exiting
the sub, where it can't have any effect, since there is no following
line that can produce an error), and both are mis-used in your code.

2. have you tried moving the DoCmd.Maximize to before you set the
Recordsource of your form? Or before you call LoadForm()? Or before
you open your new form instance? The point is, that DoCmd.Maximize
effects all windows that aren't PopUp windows, so you can call it
anywhere -- it doesn't apply to the specific object you're opening,
but to everything open in the MDI window (although, perhaps the
tabbed and split forms in A2007/2010 work differently?).

All that said, the first thing I'd check on is video drivers. This
is a classic kind of case where buggy/outdated video drivers have
often caused Access to crash in the past, so I'd check if moving the
Maximize command doesn't have any effect.

(my expectation is that if you move the Maximize to somewhere before
the setting of the Recordsource that you're going to get an error
when you set the Recordsource, or shortly thereafter)

--
David W. Fenton * * * * * * * * *http://www.dfenton.com/
contact via website only * *http://www.dfenton.com/DFA/

I moved the docmd.maximize to the top of formOpen(), same problem

if I put a stop statement at the top of formOpen(), and stopped
execution, and 'x' out of access, it crashes too

if I put docmd.maximize at the top of editBusiness it doesn't crash

so the only things that I step through from there are
* * * * *DoCmd.Maximize *<- doesn't crash
* * * * Set frm = New Form_frmBusiness
Private Sub Form_Open(Cancel As Integer)
* * * * *DoCmd.Maximize <- crashes

I will check the video drivers and the access SP's- Hide quoted text -

- Show quoted text -
I tried running the mdb using access2003, and I needed to comment out
one line
Application.LoadCustomUI "ribbon", strOut

and is works fine with access2003, and with the line commented out it
works fine with access2007
put the line back in, and it crashed

I have a very simple quick toolbar ribbon, needed for use with the
runtime, stored in an xml file
the contents of the file is read into strOut in many applications

I know there's another way to setup a ribbon, something about a hidden
table, but I couldn't get it to work, thus the xml file

I guess now I have to figure out how to use the table ....

Reply With Quote
  #5  
Old   
Roger
 
Posts: n/a

Default Re: access2007 docmd.maximize crashes - 11-08-2010 , 08:40 PM



On Nov 8, 3:52*pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:
Quote:
On Nov 8, 2:28*pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:





On Nov 8, 1:58*pm, "David-W-Fenton" <NoEm... (AT) SeeSignature (DOT) invalid
wrote:

Roger <lesperan... (AT) natpro (DOT) com> wrote innews:05e9ab7c-f9b4-4d9a-89e8-3b3d438c25f7 (AT) v28g2000prn (DOT) googlegroups.co
m:

I have a bound form with a docmd.maximize in the form open event,
this crashes the system, even though I have error handling - it's
been working fine for years with access97

A couple of things:

1. remove both On Error Resume Next statements. Neither has any
effect whatsoever (the first is superseded by the call to a sub with
error handling, the second happens as the last line before exiting
the sub, where it can't have any effect, since there is no following
line that can produce an error), and both are mis-used in your code.

2. have you tried moving the DoCmd.Maximize to before you set the
Recordsource of your form? Or before you call LoadForm()? Or before
you open your new form instance? The point is, that DoCmd.Maximize
effects all windows that aren't PopUp windows, so you can call it
anywhere -- it doesn't apply to the specific object you're opening,
but to everything open in the MDI window (although, perhaps the
tabbed and split forms in A2007/2010 work differently?).

All that said, the first thing I'd check on is video drivers. This
is a classic kind of case where buggy/outdated video drivers have
often caused Access to crash in the past, so I'd check if moving the
Maximize command doesn't have any effect.

(my expectation is that if you move the Maximize to somewhere before
the setting of the Recordsource that you're going to get an error
when you set the Recordsource, or shortly thereafter)

--
David W. Fenton * * * * * * * * *http://www.dfenton..com/
contact via website only * *http://www.dfenton.com/DFA/

I moved the docmd.maximize to the top of formOpen(), same problem

if I put a stop statement at the top of formOpen(), and stopped
execution, and 'x' out of access, it crashes too

if I put docmd.maximize at the top of editBusiness it doesn't crash

so the only things that I step through from there are
* * * * *DoCmd.Maximize *<- doesn't crash
* * * * Set frm = New Form_frmBusiness
Private Sub Form_Open(Cancel As Integer)
* * * * *DoCmd.Maximize <- crashes

I will check the video drivers and the access SP's- Hide quoted text -

- Show quoted text -

I tried running the mdb using access2003, and I needed to comment out
one line
* * *Application.LoadCustomUI "ribbon", strOut

and is works fine with access2003, and with the line commented out it
works fine with access2007
put the line back in, and it crashed

I have a very simple quick toolbar ribbon, needed for use with the
runtime, stored in an xml file
the contents of the file is read into strOut in many applications

I know there's another way to setup a ribbon, something about a hidden
table, but I couldn't get it to work, thus the xml file

I guess now I have to figure out how to use the table ....- Hide quoted text -

- Show quoted text -
I created a table uSysRibbons and loaded a record with my XLS data
it now runs properly in access2003, cause it ignores the ribbon
but still crashes with access2007

the office SP is up to date
the video drivers are current

now what can I try ?

Reply With Quote
  #6  
Old   
agiamb
 
Posts: n/a

Default Re: access2007 docmd.maximize crashes - 11-09-2010 , 11:24 AM



Sounds like there is something wrong with your ribbon xml, or a missing
ribbon callback function, or something wrong with a callback function.

--

AG
Email: npATadhdataDOTcom


"Roger" <lesperancer (AT) natpro (DOT) com> wrote

On Nov 8, 3:52 pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:
Quote:
On Nov 8, 2:28 pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:





On Nov 8, 1:58 pm, "David-W-Fenton" <NoEm... (AT) SeeSignature (DOT) invalid
wrote:

Roger <lesperan... (AT) natpro (DOT) com> wrote
innews:05e9ab7c-f9b4-4d9a-89e8-3b3d438c25f7 (AT) v28g2000prn (DOT) googlegroups.co
m:

I have a bound form with a docmd.maximize in the form open event,
this crashes the system, even though I have error handling - it's
been working fine for years with access97

A couple of things:

1. remove both On Error Resume Next statements. Neither has any
effect whatsoever (the first is superseded by the call to a sub with
error handling, the second happens as the last line before exiting
the sub, where it can't have any effect, since there is no following
line that can produce an error), and both are mis-used in your code.

2. have you tried moving the DoCmd.Maximize to before you set the
Recordsource of your form? Or before you call LoadForm()? Or before
you open your new form instance? The point is, that DoCmd.Maximize
effects all windows that aren't PopUp windows, so you can call it
anywhere -- it doesn't apply to the specific object you're opening,
but to everything open in the MDI window (although, perhaps the
tabbed and split forms in A2007/2010 work differently?).

All that said, the first thing I'd check on is video drivers. This
is a classic kind of case where buggy/outdated video drivers have
often caused Access to crash in the past, so I'd check if moving the
Maximize command doesn't have any effect.

(my expectation is that if you move the Maximize to somewhere before
the setting of the Recordsource that you're going to get an error
when you set the Recordsource, or shortly thereafter)

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/

I moved the docmd.maximize to the top of formOpen(), same problem

if I put a stop statement at the top of formOpen(), and stopped
execution, and 'x' out of access, it crashes too

if I put docmd.maximize at the top of editBusiness it doesn't crash

so the only things that I step through from there are
DoCmd.Maximize <- doesn't crash
Set frm = New Form_frmBusiness
Private Sub Form_Open(Cancel As Integer)
DoCmd.Maximize <- crashes

I will check the video drivers and the access SP's- Hide quoted text -

- Show quoted text -

I tried running the mdb using access2003, and I needed to comment out
one line
Application.LoadCustomUI "ribbon", strOut

and is works fine with access2003, and with the line commented out it
works fine with access2007
put the line back in, and it crashed

I have a very simple quick toolbar ribbon, needed for use with the
runtime, stored in an xml file
the contents of the file is read into strOut in many applications

I know there's another way to setup a ribbon, something about a hidden
table, but I couldn't get it to work, thus the xml file

I guess now I have to figure out how to use the table ....- Hide quoted
text -

- Show quoted text -
I created a table uSysRibbons and loaded a record with my XLS data
it now runs properly in access2003, cause it ignores the ribbon
but still crashes with access2007

the office SP is up to date
the video drivers are current

now what can I try ?

Reply With Quote
  #7  
Old   
Roger
 
Posts: n/a

Default Re: access2007 docmd.maximize crashes - 11-09-2010 , 11:29 AM



On Nov 9, 10:24*am, "agiamb" <NOSPAMagi... (AT) newsgroup (DOT) nospam> wrote:
Quote:
Sounds like there is something wrong with your ribbon xml, or a missing
ribbon callback function, or something wrong with a callback function.

--

AG
Email: npATadhdataDOTcom

"Roger" <lesperan... (AT) natpro (DOT) com> wrote in message

news:53c6eca6-b55f-4f32-8069-c95f560c41eb (AT) o11g2000prf (DOT) googlegroups.com...
On Nov 8, 3:52 pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:





On Nov 8, 2:28 pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:

On Nov 8, 1:58 pm, "David-W-Fenton" <NoEm... (AT) SeeSignature (DOT) invalid
wrote:

Roger <lesperan... (AT) natpro (DOT) com> wrote
innews:05e9ab7c-f9b4-4d9a-89e8-3b3d438c25f7 (AT) v28g2000prn (DOT) googlegroups.co
m:

I have a bound form with a docmd.maximize in the form open event,
this crashes the system, even though I have error handling - it's
been working fine for years with access97

A couple of things:

1. remove both On Error Resume Next statements. Neither has any
effect whatsoever (the first is superseded by the call to a sub with
error handling, the second happens as the last line before exiting
the sub, where it can't have any effect, since there is no following
line that can produce an error), and both are mis-used in your code..

2. have you tried moving the DoCmd.Maximize to before you set the
Recordsource of your form? Or before you call LoadForm()? Or before
you open your new form instance? The point is, that DoCmd.Maximize
effects all windows that aren't PopUp windows, so you can call it
anywhere -- it doesn't apply to the specific object you're opening,
but to everything open in the MDI window (although, perhaps the
tabbed and split forms in A2007/2010 work differently?).

All that said, the first thing I'd check on is video drivers. This
is a classic kind of case where buggy/outdated video drivers have
often caused Access to crash in the past, so I'd check if moving the
Maximize command doesn't have any effect.

(my expectation is that if you move the Maximize to somewhere before
the setting of the Recordsource that you're going to get an error
when you set the Recordsource, or shortly thereafter)

--
David W. Fentonhttp://www.dfenton.com/
contact via website onlyhttp://www.dfenton.com/DFA/

I moved the docmd.maximize to the top of formOpen(), same problem

if I put a stop statement at the top of formOpen(), and stopped
execution, and 'x' out of access, it crashes too

if I put docmd.maximize at the top of editBusiness it doesn't crash

so the only things that I step through from there are
DoCmd.Maximize <- doesn't crash
Set frm = New Form_frmBusiness
Private Sub Form_Open(Cancel As Integer)
DoCmd.Maximize <- crashes

I will check the video drivers and the access SP's- Hide quoted text -

- Show quoted text -

I tried running the mdb using access2003, and I needed to comment out
one line
Application.LoadCustomUI "ribbon", strOut

and is works fine with access2003, and with the line commented out it
works fine with access2007
put the line back in, and it crashed

I have a very simple quick toolbar ribbon, needed for use with the
runtime, stored in an xml file
the contents of the file is read into strOut in many applications

I know there's another way to setup a ribbon, something about a hidden
table, but I couldn't get it to work, thus the xml file

I guess now I have to figure out how to use the table ....- Hide quoted
text -

- Show quoted text -

I created a table uSysRibbons and loaded a record with my XLS data
it now runs properly in access2003, cause it ignores the ribbon
but still crashes with access2007

the office SP is up to date
the video drivers are current

now what can I try ?- Hide quoted text -

- Show quoted text -
I don't use callbacks, and this is the xml
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui">
<!-- http://www.accessribbon.de/en/index.php -->
<ribbon startFromScratch="true">
<qat>
<documentControls>
<button idMso="FileSave"/>
<button idMso="Copy"/>
<button idMso="Paste"/>
<button idMso="PrintDialogAccess"/>
<button idMso="PrintPreviewClose"/>
<button idMso="FilterBySelection"/>
<button idMso="ApplyFilter"/>
<button idMso="AdpOutputOperationsSortAscending"/>
<button idMso="AdpOutputOperationsSortDescending"/>
<button idMso="ExportExcel"/>
<button idMso="ExportWord"/>
<button idMso="SpellingAccess"/>
<button idMso="WindowsCascade"/>
<button idMso="FileExit"/>
</documentControls>
</qat>
</ribbon>
</customUI>

I will start trimming it until it works or....

Reply With Quote
  #8  
Old   
Roger
 
Posts: n/a

Default Re: access2007 docmd.maximize crashes - 11-09-2010 , 12:53 PM



On Nov 9, 10:29*am, Roger <lesperan... (AT) natpro (DOT) com> wrote:
Quote:
On Nov 9, 10:24*am, "agiamb" <NOSPAMagi... (AT) newsgroup (DOT) nospam> wrote:





Sounds like there is something wrong with your ribbon xml, or a missing
ribbon callback function, or something wrong with a callback function.

--

AG
Email: npATadhdataDOTcom

"Roger" <lesperan... (AT) natpro (DOT) com> wrote in message

news:53c6eca6-b55f-4f32-8069-c95f560c41eb (AT) o11g2000prf (DOT) googlegroups.com....
On Nov 8, 3:52 pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:

On Nov 8, 2:28 pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:

On Nov 8, 1:58 pm, "David-W-Fenton" <NoEm... (AT) SeeSignature (DOT) invalid
wrote:

Roger <lesperan... (AT) natpro (DOT) com> wrote
innews:05e9ab7c-f9b4-4d9a-89e8-3b3d438c25f7 (AT) v28g2000prn (DOT) googlegroups.co
m:

I have a bound form with a docmd.maximize in the form open event,
this crashes the system, even though I have error handling - it's
been working fine for years with access97

A couple of things:

1. remove both On Error Resume Next statements. Neither has any
effect whatsoever (the first is superseded by the call to a sub with
error handling, the second happens as the last line before exiting
the sub, where it can't have any effect, since there is no following
line that can produce an error), and both are mis-used in your code.

2. have you tried moving the DoCmd.Maximize to before you set the
Recordsource of your form? Or before you call LoadForm()? Or before
you open your new form instance? The point is, that DoCmd.Maximize
effects all windows that aren't PopUp windows, so you can call it
anywhere -- it doesn't apply to the specific object you're opening,
but to everything open in the MDI window (although, perhaps the
tabbed and split forms in A2007/2010 work differently?).

All that said, the first thing I'd check on is video drivers. This
is a classic kind of case where buggy/outdated video drivers have
often caused Access to crash in the past, so I'd check if moving the
Maximize command doesn't have any effect.

(my expectation is that if you move the Maximize to somewhere before
the setting of the Recordsource that you're going to get an error
when you set the Recordsource, or shortly thereafter)

--
David W. Fentonhttp://www.dfenton.com/
contact via website onlyhttp://www.dfenton.com/DFA/

I moved the docmd.maximize to the top of formOpen(), same problem

if I put a stop statement at the top of formOpen(), and stopped
execution, and 'x' out of access, it crashes too

if I put docmd.maximize at the top of editBusiness it doesn't crash

so the only things that I step through from there are
DoCmd.Maximize <- doesn't crash
Set frm = New Form_frmBusiness
Private Sub Form_Open(Cancel As Integer)
DoCmd.Maximize <- crashes

I will check the video drivers and the access SP's- Hide quoted text -

- Show quoted text -

I tried running the mdb using access2003, and I needed to comment out
one line
Application.LoadCustomUI "ribbon", strOut

and is works fine with access2003, and with the line commented out it
works fine with access2007
put the line back in, and it crashed

I have a very simple quick toolbar ribbon, needed for use with the
runtime, stored in an xml file
the contents of the file is read into strOut in many applications

I know there's another way to setup a ribbon, something about a hidden
table, but I couldn't get it to work, thus the xml file

I guess now I have to figure out how to use the table ....- Hide quoted
text -

- Show quoted text -

I created a table uSysRibbons and loaded a record with my XLS data
it now runs properly in access2003, cause it ignores the ribbon
but still crashes with access2007

the office SP is up to date
the video drivers are current

now what can I try ?- Hide quoted text -

- Show quoted text -

I don't use callbacks, and this is the xml
customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui"
!--http://www.accessribbon.de/en/index.php--
* *<ribbon startFromScratch="true"
* * *<qat
* * * *<documentControls
* * * * * <button idMso="FileSave"/
* * * * * <button idMso="Copy"/
* * * * * <button idMso="Paste"/
* * * * * <button idMso="PrintDialogAccess"/
* * * * * <button idMso="PrintPreviewClose"/
* * * * * <button idMso="FilterBySelection"/
* * * * * <button idMso="ApplyFilter"/
* * * * * <button idMso="AdpOutputOperationsSortAscending"/
* * * * * <button idMso="AdpOutputOperationsSortDescending"/
* * * * * <button idMso="ExportExcel"/
* * * * * <button idMso="ExportWord"/
* * * * * <button idMso="SpellingAccess"/
* * * * * <button idMso="WindowsCascade"/
* * * * * <button idMso="FileExit"/
* * * *</documentControls
* * *</qat
* *</ribbon
/customUI

I will start trimming it until it works or....- Hide quoted text -

- Show quoted text -
this trimmed down xml causes the app to work properly
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui">
</customUI>

this xml causes the crash
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui">
<ribbon startFromScratch="true">
</ribbon>
</customUI>

I've checked other postings in this group, and the xml should / does
hide the ribbon, but in some conditions, it crashes access2007

Reply With Quote
  #9  
Old   
agiamb
 
Posts: n/a

Default Re: access2007 docmd.maximize crashes - 11-09-2010 , 03:30 PM



XML is case sensitive.
customUI

--

AG
Email: npATadhdataDOTcom


"Roger" <lesperancer (AT) natpro (DOT) com> wrote

On Nov 9, 10:29 am, Roger <lesperan... (AT) natpro (DOT) com> wrote:
Quote:
On Nov 9, 10:24 am, "agiamb" <NOSPAMagi... (AT) newsgroup (DOT) nospam> wrote:





Sounds like there is something wrong with your ribbon xml, or a missing
ribbon callback function, or something wrong with a callback function.

--

AG
Email: npATadhdataDOTcom

"Roger" <lesperan... (AT) natpro (DOT) com> wrote in message

news:53c6eca6-b55f-4f32-8069-c95f560c41eb (AT) o11g2000prf (DOT) googlegroups.com...
On Nov 8, 3:52 pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:

On Nov 8, 2:28 pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:

On Nov 8, 1:58 pm, "David-W-Fenton" <NoEm... (AT) SeeSignature (DOT) invalid
wrote:

Roger <lesperan... (AT) natpro (DOT) com> wrote
innews:05e9ab7c-f9b4-4d9a-89e8-3b3d438c25f7 (AT) v28g2000prn (DOT) googlegroups.co
m:

I have a bound form with a docmd.maximize in the form open
event,
this crashes the system, even though I have error handling -
it's
been working fine for years with access97

A couple of things:

1. remove both On Error Resume Next statements. Neither has any
effect whatsoever (the first is superseded by the call to a sub
with
error handling, the second happens as the last line before exiting
the sub, where it can't have any effect, since there is no
following
line that can produce an error), and both are mis-used in your
code.

2. have you tried moving the DoCmd.Maximize to before you set the
Recordsource of your form? Or before you call LoadForm()? Or
before
you open your new form instance? The point is, that DoCmd.Maximize
effects all windows that aren't PopUp windows, so you can call it
anywhere -- it doesn't apply to the specific object you're
opening,
but to everything open in the MDI window (although, perhaps the
tabbed and split forms in A2007/2010 work differently?).

All that said, the first thing I'd check on is video drivers. This
is a classic kind of case where buggy/outdated video drivers have
often caused Access to crash in the past, so I'd check if moving
the
Maximize command doesn't have any effect.

(my expectation is that if you move the Maximize to somewhere
before
the setting of the Recordsource that you're going to get an error
when you set the Recordsource, or shortly thereafter)

--
David W. Fentonhttp://www.dfenton.com/
contact via website onlyhttp://www.dfenton.com/DFA/

I moved the docmd.maximize to the top of formOpen(), same problem

if I put a stop statement at the top of formOpen(), and stopped
execution, and 'x' out of access, it crashes too

if I put docmd.maximize at the top of editBusiness it doesn't crash

so the only things that I step through from there are
DoCmd.Maximize <- doesn't crash
Set frm = New Form_frmBusiness
Private Sub Form_Open(Cancel As Integer)
DoCmd.Maximize <- crashes

I will check the video drivers and the access SP's- Hide quoted
text -

- Show quoted text -

I tried running the mdb using access2003, and I needed to comment out
one line
Application.LoadCustomUI "ribbon", strOut

and is works fine with access2003, and with the line commented out it
works fine with access2007
put the line back in, and it crashed

I have a very simple quick toolbar ribbon, needed for use with the
runtime, stored in an xml file
the contents of the file is read into strOut in many applications

I know there's another way to setup a ribbon, something about a hidden
table, but I couldn't get it to work, thus the xml file

I guess now I have to figure out how to use the table ....- Hide
quoted
text -

- Show quoted text -

I created a table uSysRibbons and loaded a record with my XLS data
it now runs properly in access2003, cause it ignores the ribbon
but still crashes with access2007

the office SP is up to date
the video drivers are current

now what can I try ?- Hide quoted text -

- Show quoted text -

I don't use callbacks, and this is the xml
customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui"
!--http://www.accessribbon.de/en/index.php--
ribbon startFromScratch="true"
qat
documentControls
button idMso="FileSave"/
button idMso="Copy"/
button idMso="Paste"/
button idMso="PrintDialogAccess"/
button idMso="PrintPreviewClose"/
button idMso="FilterBySelection"/
button idMso="ApplyFilter"/
button idMso="AdpOutputOperationsSortAscending"/
button idMso="AdpOutputOperationsSortDescending"/
button idMso="ExportExcel"/
button idMso="ExportWord"/
button idMso="SpellingAccess"/
button idMso="WindowsCascade"/
button idMso="FileExit"/
/documentControls
/qat
/ribbon
/customUI

I will start trimming it until it works or....- Hide quoted text -

- Show quoted text -
this trimmed down xml causes the app to work properly
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui">
</customUI>

this xml causes the crash
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui">
<ribbon startFromScratch="true">
</ribbon>
</customUI>

I've checked other postings in this group, and the xml should / does
hide the ribbon, but in some conditions, it crashes access2007

Reply With Quote
  #10  
Old   
agiamb
 
Posts: n/a

Default Re: access2007 docmd.maximize crashes - 11-09-2010 , 03:30 PM



XML is case sensitive.
customUI

--

AG
Email: npATadhdataDOTcom


"Roger" <lesperancer (AT) natpro (DOT) com> wrote

On Nov 9, 10:29 am, Roger <lesperan... (AT) natpro (DOT) com> wrote:
Quote:
On Nov 9, 10:24 am, "agiamb" <NOSPAMagi... (AT) newsgroup (DOT) nospam> wrote:





Sounds like there is something wrong with your ribbon xml, or a missing
ribbon callback function, or something wrong with a callback function.

--

AG
Email: npATadhdataDOTcom

"Roger" <lesperan... (AT) natpro (DOT) com> wrote in message

news:53c6eca6-b55f-4f32-8069-c95f560c41eb (AT) o11g2000prf (DOT) googlegroups.com...
On Nov 8, 3:52 pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:

On Nov 8, 2:28 pm, Roger <lesperan... (AT) natpro (DOT) com> wrote:

On Nov 8, 1:58 pm, "David-W-Fenton" <NoEm... (AT) SeeSignature (DOT) invalid
wrote:

Roger <lesperan... (AT) natpro (DOT) com> wrote
innews:05e9ab7c-f9b4-4d9a-89e8-3b3d438c25f7 (AT) v28g2000prn (DOT) googlegroups.co
m:

I have a bound form with a docmd.maximize in the form open
event,
this crashes the system, even though I have error handling -
it's
been working fine for years with access97

A couple of things:

1. remove both On Error Resume Next statements. Neither has any
effect whatsoever (the first is superseded by the call to a sub
with
error handling, the second happens as the last line before exiting
the sub, where it can't have any effect, since there is no
following
line that can produce an error), and both are mis-used in your
code.

2. have you tried moving the DoCmd.Maximize to before you set the
Recordsource of your form? Or before you call LoadForm()? Or
before
you open your new form instance? The point is, that DoCmd.Maximize
effects all windows that aren't PopUp windows, so you can call it
anywhere -- it doesn't apply to the specific object you're
opening,
but to everything open in the MDI window (although, perhaps the
tabbed and split forms in A2007/2010 work differently?).

All that said, the first thing I'd check on is video drivers. This
is a classic kind of case where buggy/outdated video drivers have
often caused Access to crash in the past, so I'd check if moving
the
Maximize command doesn't have any effect.

(my expectation is that if you move the Maximize to somewhere
before
the setting of the Recordsource that you're going to get an error
when you set the Recordsource, or shortly thereafter)

--
David W. Fentonhttp://www.dfenton.com/
contact via website onlyhttp://www.dfenton.com/DFA/

I moved the docmd.maximize to the top of formOpen(), same problem

if I put a stop statement at the top of formOpen(), and stopped
execution, and 'x' out of access, it crashes too

if I put docmd.maximize at the top of editBusiness it doesn't crash

so the only things that I step through from there are
DoCmd.Maximize <- doesn't crash
Set frm = New Form_frmBusiness
Private Sub Form_Open(Cancel As Integer)
DoCmd.Maximize <- crashes

I will check the video drivers and the access SP's- Hide quoted
text -

- Show quoted text -

I tried running the mdb using access2003, and I needed to comment out
one line
Application.LoadCustomUI "ribbon", strOut

and is works fine with access2003, and with the line commented out it
works fine with access2007
put the line back in, and it crashed

I have a very simple quick toolbar ribbon, needed for use with the
runtime, stored in an xml file
the contents of the file is read into strOut in many applications

I know there's another way to setup a ribbon, something about a hidden
table, but I couldn't get it to work, thus the xml file

I guess now I have to figure out how to use the table ....- Hide
quoted
text -

- Show quoted text -

I created a table uSysRibbons and loaded a record with my XLS data
it now runs properly in access2003, cause it ignores the ribbon
but still crashes with access2007

the office SP is up to date
the video drivers are current

now what can I try ?- Hide quoted text -

- Show quoted text -

I don't use callbacks, and this is the xml
customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui"
!--http://www.accessribbon.de/en/index.php--
ribbon startFromScratch="true"
qat
documentControls
button idMso="FileSave"/
button idMso="Copy"/
button idMso="Paste"/
button idMso="PrintDialogAccess"/
button idMso="PrintPreviewClose"/
button idMso="FilterBySelection"/
button idMso="ApplyFilter"/
button idMso="AdpOutputOperationsSortAscending"/
button idMso="AdpOutputOperationsSortDescending"/
button idMso="ExportExcel"/
button idMso="ExportWord"/
button idMso="SpellingAccess"/
button idMso="WindowsCascade"/
button idMso="FileExit"/
/documentControls
/qat
/ribbon
/customUI

I will start trimming it until it works or....- Hide quoted text -

- Show quoted text -
this trimmed down xml causes the app to work properly
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui">
</customUI>

this xml causes the crash
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui">
<ribbon startFromScratch="true">
</ribbon>
</customUI>

I've checked other postings in this group, and the xml should / does
hide the ribbon, but in some conditions, it crashes access2007

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.