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 23rd, 2004, 04:36 AM
Registered User
 
Join Date: Jul 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to chimp
Default Trouble after saving to previous version

i have been working on this project all week and now it is almost ready to use i am having problems after saving the file to a previous version..

it was designed in Access 2K and it worked fine, i need this in access 97, so i saved it as a prior version of Access and opened it and debugged it and saved the modules, but now when i run it i get a message appear saying,

The action or method requires a query name argument

you tried to open the use openquery action or method, but you left the name argument blank, in th equery name argument, enter a query name.


what is this meaning please ? my code is below

Code:
Option Compare Database
Option Explicit


Private Sub DisplaySection_AfterUpdate()
    Select Case DisplaySection
        Case 1
            Me.ByMachine.Visible = True
            Me.ByEventcode.Visible = False
        Case 2
            Me.ByEventcode.Visible = True
            Me.ByMachine.Visible = False
    End Select
End Sub
Private Sub cmdRunQuery_Click()
    On Error GoTo Err_cmdRunQuery_Click
    DoCmd.SetWarnings False
    DoCmd.OpenQuery ("qEventcodeanalysis")
    DoCmd.SetWarnings True
    Select Case Me.DisplaySection
        Case 1
            DoCmd.OpenQuery Me.ByMachine.Column(1), , acReadOnly
        Case 2
            DoCmd.OpenQuery Me.ByEventcode.Column(1), , acReadOnly
    End Select
Exit_cmdRunQuery_Click:
    Exit Sub

Err_cmdRunQuery_Click:
    MsgBox Err.Description
    Resume Exit_cmdRunQuery_Click
End Sub

Private Sub DisplaySection_Enter()
    If (Len(cboDaycodeStart & vbNullString) = 0) Or (Len(cboDaycodeEnd & vbNullString) = 0) Or (Len(Line & vbNullString) = 0) Then
        If (Len(cboDaycodeStart & vbNullString) = 0) Or (Len(cboDaycodeEnd & vbNullString) = 0) Then
            MsgBox "Please enter start and end Daycodes"
            If (Len(cboDaycodeStart & vbNullString) = 0) Then
                Me.cboDaycodeStart.SetFocus
                Exit Sub
            ElseIf (Len(cboDaycodeEnd & vbNullString) = 0) Then
                Me.cboDaycodeEnd.SetFocus
                Exit Sub
            End If
        End If
        If Len(Line & vbNullString) = 0 Then
            MsgBox "Please select a line"
            Me.Line.SetFocus
        End If
    End If
End Sub


Private Sub cmdClose_Click()
    On Error GoTo Err_cmdClose_Click


    DoCmd.Close

Exit_cmdClose_Click:
    Exit Sub

Err_cmdClose_Click:
    MsgBox Err.Description
    Resume Exit_cmdClose_Click

End Sub







Similar Threads
Thread Thread Starter Forum Replies Last Post
VB deployment - uninstalling previous version madhukp VB How-To 1 January 4th, 2006 09:54 AM
EXCEL question saving a file saving the the first macupryk VS.NET 2002/2003 0 January 6th, 2005 05:33 PM
How To avoid the SAving of toolbars while saving Hari_Word Excel VBA 6 July 26th, 2004 12:13 AM
Problem In Saving Previous Url zaeem Classic ASP Basics 2 November 16th, 2003 12:08 PM





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