Rabu, 27 Januari 2016

Re: [MS_AccessPros] Error on report opening while no picture

 

Khalid-


Find any .jpeg file and double-click it to see which program opens as the default.  Do the same with .jpg.  If they're not the same program, then that's probably at least part of the problem.  You still haven't told me about file sizes.  You can fix program associations through Explorer.  Right-click a .jpeg file and select Properties.  On the General tab, click the Change button next to Opens with:.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)



On Jan 27, 2016, at 12:42 PM, Khalid Tanweer khalidtanweerburrah@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

John

How could this be checked and resolved ?

Regards,
Khalid


On Saturday, January 23, 2016 5:04 PM, "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com> wrote:


 
Khalid-

As I noted earlier, I'm not sure that the Image control will display .pdf at all.  It should handle .jpeg, but the problem may be file size or that your file extension association for .jpeg is different from .jpg.  They should be the same.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)



On Jan 23, 2016, at 7:07 AM, Khalid Tanweer khalidtanweerburrah@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

John,
The image with .gif extensions loads, using Bar code in this format resolves the problem. But yet .pdf and . Jpeg give problem and do not have images in these formats at hand right now, when i get them i will inform about their sizes using windows explorer.

Regards,
Khalid


On Sunday, January 17, 2016 6:07 PM, "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com> wrote:


 
Khalid-

It sounds like the files are too large.  If you look at them in detail mode in Windows Explorer, what is the size of the files?

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)



On Jan 17, 2016, at 12:21 PM, khalidtanweerburrah@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

John,
I am still not getting .pdf OR .Jpeg image on my report.
What else should i check for it. Does size of image matters? and one thing more should i have to check 'References' am i missing some of that in this database?

All of my report is perfect except i am not getting these images.
.Jpg are displaying OK.

I converted a two columns about 4 inches width of Excel to .pdf and tried to view in report but i got following error message:

Run-time error '2114'
PCTL Management doesn't support the format of the file
'D:\PCTL\BarCode\2015--B-08.pdf,' or file is too large. Try converting
the file to BMP or GIF format.

For .Jpeg i am getting error message something like '......the file is too large, try converting it to .bmp or .jpg...'
My expected image for Bar code would be approx. 4 to 5 inches wide and 1-1/2 to 2 inches tall.

Please help.
Regards,
Khalid  
 


---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

Khalid-

.jpeg or .jpg should work just fine.  The Image control may display .pdf, but only the first page.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)



On Jan 12, 2016, at 11:39 AM, khalidtanweerburrah@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

John,

As i replied yesterday that was a great idea to store an image in BarCode folder with the name 'NotFound.Jpg'.
It worked perfectly and then i discussed with my boss, he did not agreed that something such like should display on the report. So i simply changed the Fore Color to 'White'.

Now if there is no BarCode for any Consignment i do not get error and 'NotFound.Jpg' is used having White Fore Color so nothing written is shown there.

I do remember once you also told me to get different types of images apart from .Jpg, like .pdf I will have to check your mails to retrieve that. Because my boss saved an image with .Jpeg format.

Thanks once again,
Regards,
Khalid
 


---In MS_Access_Professionals@yahoogroups.com, <khalidtanweerburrah@...> wrote :

John,
Good idea! i will work on it tonight.

I also gone through experimenting IFF statement but could not manage it. Is there any possibility of this to try?

Regards,
Khalid


---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

Khalid-

Rather than display the annoying dialog, why not just store an image that says "Bar code / picture not found" and store it in your image directory.  Then your code would be:

Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
    If IsNull(Me![ImagePath]) Then
        Me!ImageFrame.Picture = "D:\PCTL\BarCode\NotFound.jpg"
    Else
        Me![ImageFrame].Picture = Me![ImagePath]
    End If
End Sub

Of course, your image would have to be named "NotFound.jpg".  😃


John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)



On Jan 11, 2016, at 11:15 AM, khalidtanweerburrah@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

John,

It is not yet working, I am still getting msgbox displayed twice.
Khalid


---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

Khalid-

No problem.  By way of explanation, the FormatCount parameter contains a counter that tells you whether this is the first or subsequent pass attempting to format the section.  For a report footer, you can get a second pass if the footer won't fit on the last page or you have set properties to force the footer to go to a new page.  It will start to format, call the event procedure, then if the section won't fit, it fires the Retreat event, updates the Format Count, and tries again on a new page.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)



On Jan 10, 2016, at 11:31 AM, khalidtanweerburrah@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

John,

Thanks for your quick response, but i am sorry i will have to answer you tomorrow as at the moment i am at my different work place.

Thanks once again,

Regards,
Khalid


---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

Khalid-

For some reason, the report engine is trying to format twice.  Do this:

Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
    If FormatCount <> 1 Then Exit Sub
    If IsNull(Me![ImagePath]) Then
        MsgBox "Bar code/picture not found for this Sale Invoice." _
        , vbInformation, "PCTL Management - Information"
        Me.ImageFrame.Visible = False
    Else
        Me.ImageFrame.Visible = True
        Me![ImageFrame].Picture = Me![ImagePath]
    End If
End Sub

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)



On Jan 10, 2016, at 11:19 AM, khalidtanweerburrah@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

John,

This is OK and no error coming, the only thing remained is that msgbox displays twice. I tried to put Cancel = -1 but even then msgbox displays twice.

Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
    If IsNull(Me![ImagePath]) Then
        MsgBox "Bar code/picture not found for this Sale Invoice." _
        , vbInformation, "PCTL Management - Information"
        Me.ImageFrame.Visible = False
Cancel = -1  <======
    Else
        Me.ImageFrame.Visible = True
        Me![ImageFrame].Picture = Me![ImagePath]
    End If
End Sub

Regards,
Khalid


---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

Khalid-

The problem is you're canceling the event, so that causes none of the controls to display.  Try this:

Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
    If IsNull(Me![ImagePath]) Then
        MsgBox "Bar code/picture not found for this Sale Invoice." _
        , vbInformation, "PCTL Management - Information"
        Me.ImageFrame.Visible = False
    Else
        Me.ImageFrame.Visible = True
        Me![ImageFrame].Picture = Me![ImagePath]
    End If
End Sub

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)



On Jan 10, 2016, at 9:03 AM, Khalid Tanweer khalidtanweerburrah@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:








__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (18)

.

__,_._,___

Tidak ada komentar:

Posting Komentar