Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 9th, 2003, 01:47 PM
Authorized User
 
Join Date: Sep 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Beth,

Here is the code where it goes.

This code is linked to a button which is supposed to print a label after that user finished his/her data entry. A flag is updated to know that a label was printed and statistics are updated after that.

The problem is : " Clicking or Enter on the button more than once and the reaction is a close up of the application and a shutdown of ACCESS.

Private Sub imprim_etiq_Click()

On Error GoTo Err_imprim_etiq_Click
    Dim stDocName As String
    Dim no_cl_curr As Integer

    stDocName = "Etiquettes"
--->
    DoCmd.OpenReport stDocName, acNormal

    maj_stat
    no_cl_curr = Forms![pochettes]![No-cl]
    DoCmd.RunSQL (" UPDATE Pochettes " & _
         " SET Pochettes.[etiq-poc-imprimee] = True " & _
         " WHERE (((Forms!Pochettes![no-cl])=Pochettes![no-cl]) " & _
         " And ((Pochettes![No-poc])=Forms!Pochettes![No-poc]));")
    Set Form_Pochettes = Nothing
    DoCmd.GoToRecord , , acNewRec
    Forms![pochettes]![No-cl] = no_cl_curr
    Dim ctl As Control
    Set ctl = Forms![pochettes]![no-poc]
    DoCmd.GoToControl ctl.Name

Exit_imprim_etiq_Click:
    Exit Sub

Err_imprim_etiq_Click:
    MsgBox "erreur lors de l'impression de l'etiquette"
    Resume Exit_imprim_etiq_Click
End Sub


Bassam Sater
 
Old September 17th, 2003, 11:29 AM
Authorized User
 
Join Date: Sep 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi every body,

After a little serch in the help about Access 2002 and 2000, its seems to be a generation problem. THE MDE file must be generated under ACCESS 2000 if to be used within the two versions, the performance is also better under 2000.

Sorry that i disturbed all of you, i thought that its also up to me to tell you about what i found.

Thanks a lot,
Bassam

Bassam Sater





Similar Threads
Thread Thread Starter Forum Replies Last Post
.net on Windows 98 sh.rajkumar C# 2005 1 October 23rd, 2006 03:53 AM
HELP - Access 2000 Runtime w Windows XP Compiled.. chasidim Access 2 April 3rd, 2006 11:06 AM
VB Source code in 98 vs. XP amitmohod Beginning VB 6 2 December 8th, 2005 07:42 PM
Windows XP ( +access 2003) problem? belete Access 1 October 11th, 2004 09:19 AM
Windows 98 OCX control issues vs Windows XP benoyraj VB How-To 0 May 5th, 2004 08:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.