Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
idefaz  
#1 Posted : Wednesday, August 21, 2019 3:55:35 AM(UTC)
idefaz

Rank: Newbie

Groups: Registered
Joined: 8/21/2019(UTC)
Posts: 9
Location: nv

the iGrid objects in my databases are extremely large. Anyone know how i can refresh whatever it is that's causing this?

If i make a copy of the database, delete the iGrid objects in a form then compact and repair i see anywhere from 30mb to 100mb file size reduction.

Edited by user Wednesday, September 18, 2019 9:15:09 PM(UTC)  | Reason: Not specified

Igor/10Tec  
#2 Posted : Wednesday, August 21, 2019 7:51:58 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,111

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
iGrid is a visual control but not a thing that stores data. As such, it should not be very big in size, especially if we talk about tens of megabytes.

Perhaps, your form is corrupted and you need to recreate it to fix this issue.
idefaz  
#3 Posted : Wednesday, September 4, 2019 3:06:47 AM(UTC)
idefaz

Rank: Newbie

Groups: Registered
Joined: 8/21/2019(UTC)
Posts: 9
Location: nv

Think i could send you a file where this is happening? It will randomly happen while coding. The file size will jump by like 50mb per iGrid object in the form. When this happens i just delete the iGrid objects and put new ones in, then compact and repair. Now that i have a work around it's kind of just annoying. Although before i figured it out it was crashing access, losing work, etc..

Here is the code i use to format the iGrid on load.

Code:

Private Sub grdSetup(cgrd)
    ' format iGrid
    If ErrCatchOn Then On Error GoTo Grr
    Dim grd As iGrid
    Set grd = cgrd
    Dim m As Variant
    
    m = GetDpi
    
    Set cgrd.BackgroundPicture = LoadPicture(Application.CurrentProject.path & "\bg.jpg")
    
    With grd
        .BeginUpdate
        
        .RowMode = True
        .Editable = False
        
        .Font.Name = "Consolas"
        .Font.Size = 20
        .ForeColor = vbWhite
        
        .GridLines = igGridLinesHorizontal
        
        .header.UseXPStyles = False
        .header.BackColor = vbActiveBorder
        .header.ForeColor = vbBlack
        .header.Font.Name = "Consolas"
        .header.Font.Size = 14
        .header.Height = 30 * m
        .header.Flat = True
        
        .EndUpdate
    End With
    
    Set grd = Nothing
   
GrrExit:
    Exit Sub
Grr:
    MsgBox Err.Description
    Resume GrrExit
End Sub
Igor/10Tec  
#4 Posted : Wednesday, September 4, 2019 8:52:17 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,111

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
Oh, now I see you are loading a picture bg.jpg. What is the size of this file? Try to use iGrid without this custom background picture and tell us whether your problem is gone.

We have never heard about the issue you reported earlier. Perhaps, it occurs because of the picture you load. I think so because I can't recall that anyone from our customers used background pictures for iGrid in Access forms before. If it is true, then the problem somewhere on the side of MS Access because binary big data are stored in form resources by this dev env, not by iGrid.

BTW, you can also experiment with forms without iGrid. Does your problem occur if you load your bg.jpg with the LoadPicture function then?
idefaz  
#5 Posted : Wednesday, September 4, 2019 8:56:24 PM(UTC)
idefaz

Rank: Newbie

Groups: Registered
Joined: 8/21/2019(UTC)
Posts: 9
Location: nv

image is 662KB. It is fine for a time during development. It seems to occur when i have the form open and i'm altering code (after a few saves).

I've attached a database with all links and code deleted. The only thing is one form and the weird state of the iGrid object. file is 14 mb (zipped less than 1mb). example.zip (878kb) downloaded 3 time(s).
Igor/10Tec  
#6 Posted : Friday, September 6, 2019 12:05:27 PM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,111

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
Sorry, but this database didn't help. If you say that the db increases in size when you switch to code editing, then the problem is definitely not on the side of iGrid.

BTW, when I launched your database, I got a message that the AccessImagine OCX v1.74 cannot be found. Can this component be the source of your problem?
idefaz  
#7 Posted : Friday, September 6, 2019 9:11:08 PM(UTC)
idefaz

Rank: Newbie

Groups: Registered
Joined: 8/21/2019(UTC)
Posts: 9
Location: nv

hmm... interesting. So, the database wasn't 14mb for you? Also, that AccessImagine thing i never used... i totally forgot it was there. Maybe it is the issue. I shall see.
idefaz  
#8 Posted : Friday, September 6, 2019 9:31:02 PM(UTC)
idefaz

Rank: Newbie

Groups: Registered
Joined: 8/21/2019(UTC)
Posts: 9
Location: nv

No change. Maybe the form is broken. It doesn't happen if there is no iGrid on the form, though. I'm stumped.

click to open full size

UserPostedImage

Edited by user Friday, September 6, 2019 9:58:21 PM(UTC)  | Reason: Not specified

Igor/10Tec  
#9 Posted : Monday, September 9, 2019 7:11:10 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,111

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
Thank you for your video. It really helped to understand your problem.

I saved the form as a text file to understand which control has this big size. I issued the following command in the Immediate window:

Code:
Application.SaveAsText acForm, "Production", "D:\Stuff\Form_Production.txt"


Indeed, the internal OleData property for iGrid0 is extremely big. However, I have no ideas how to explain this except one - the form became corrupted at one point in time earlier, and now you get this "long tail" of binary data associated with the iGrid control.

I asked you to reproduce the problem in a new form and without uploading the background picture into iGrid. Have you tried that?
idefaz  
#10 Posted : Tuesday, September 10, 2019 2:53:52 AM(UTC)
idefaz

Rank: Newbie

Groups: Registered
Joined: 8/21/2019(UTC)
Posts: 9
Location: nv

I have not yet tried that. I will comment out that line in the code and put fresh iGrid objects to the current form i'm working on. If i experience the issue again i will let you know.

Thanks for looking into.
idefaz  
#11 Posted : Wednesday, September 11, 2019 11:21:38 PM(UTC)
idefaz

Rank: Newbie

Groups: Registered
Joined: 8/21/2019(UTC)
Posts: 9
Location: nv

So far i have not run into the issue while not loading the image to the bg. I think that may have been it.

I'll just not load the image while in dev mode.

Cheers, thanks for your time.
Igor/10Tec  
#12 Posted : Thursday, September 12, 2019 7:20:01 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,111

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
Then, I think, the problem is in MS Access and how it processes images in 3rd-party ActiveX controls (in fact OLE data). The ability to set the grid background picture works in other development environments like Visual Basic 6 without any problems, so it seems the problem is on the side of MS Access.
idefaz  
#13 Posted : Wednesday, September 18, 2019 9:14:24 PM(UTC)
idefaz

Rank: Newbie

Groups: Registered
Joined: 8/21/2019(UTC)
Posts: 9
Location: nv

I just set the code to not load the image when in development mode. So far it's been working great. Thanks for the help!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.