Can't "clean up" macro recorder Access query

2012-08-16  Source: Original Site  Category:Excel  Views:0 

Advertisement

Trying to clean up an Excel macro that querys an Access db. There is an extra comma I don't understand. The recored macro works fine. I want to clean it up because the macro will be modified to loop through various querys.

I was able to clean it up to this point:

"AND (`Daily Production Counts`.intShi", "ft=1) " & _
"AND (`Daily Production Counts`.PartNumber In ('52101-02020','52159-02270'))")

It works with the comma in the middle of the field name and the recored macro put the comma in the field.

but when I try and clean it up to this, the macro fails:

"AND (`Daily Production Counts`.intShift=1) " & _
"AND (`Daily Production Counts`.PartNumber In ('52101-02020','52159-02270'))")

The orginal macro had .intShift=1 spread across two rows. I guess I don't understand VBA rules for putting a field name across two lines.

Related articles
  • Can't "clean up" macro recorder Access query 2012-08-16

    Trying to clean up an Excel macro that querys an Access db. There is an extra comma I don't understand. The recored macro works fine. I want to clean it up because the macro will be modified to loop through various querys. I was able to clean it up t

  • where can I get a macro recorder 2014-10-13

    I would like to imbed a macro recorder/player into a Win32 app. The recorder must be able to record both keyboard and mouse input. Does anyone know where I can get such a thing? Commercial or public domain is OK. Mike Newberry

  • Ubuntu How can I clean the information recorded by apport? 2014-08-28

    I am making a customized version of Ubuntu. A problem occured during the install of a specific package. But then I fixed that problem. However, I thought apport had recorded that, which led to an annoying result. Each time a user installed my version

  • Access Query help pulling miltiple records 2013-06-04

    Please help I am trying to do an access query using an inner join...I am using an or to seperate the statements after the inner join...Can this not be done? I need a way to pull the records just once and right now it is duplicating them...Any help wo

  • vb application not returning all records from access query in recordset 2013-07-05

    Hi I am running a vb6 application which accesses an SQL server database and an Access database. I have a table in the access db with 30 records in it and an access query which just changes the order of these 30 records. However, when i run the applic

  • How can I pass a paramater to MS Access query through the command line 2015-05-30

    How can I pass a paramater to MS Access query through the command line " C:\....\MSAccess.exe C:\....\MyAccess_database.mdb "

  • Can any body convert Ms-Access query into oracle query 2012-10-17

    This is Ms-Access Query SELECT Category,SubCat,MDesc,taskfreq.TaskId,TaskFreq.TradeID,Freq,FDate,TDate,Type,Unit,TaskType, EqMaster.MSerial,TDesc,SDesc,QSetSum.SSERIAL FROM (( (TaskFreq LEFT JOIN TaskDef ON TaskFreq.TaskId = TaskDef.TaskId) INNER JOI

  • ADO & Access Query 2012-06-29

    I have created a query called CinfoQuery in Access 2000 where I joined two tables Cinfo and CDetail with the following fields; Cinfo.Company, CInfo.IPO, CDetail.City, CDetail.State, they are joined by the same ID; CinfoID = CDetailID "Not A Problem"

  • Excel crosspost goodness: translating access query to excel 2013-10-03

    a folks.. I'm trying to figure out an excel only solution to duplicate an access query. I have a datasource with multiple entries for a given item number. These entries have a date and a quantity attached to them. I want to return the date and quanti

  • Using Access-query as source for a recordset 2014-12-10

    When starting my DB I want to make a check if a certain field is filled in. Therefor I made a query (using the Access Query-wizard) which I use for generating a report. Now even if there are no records in the query a (empty) report is shown. So I was

  • Export Access Query to Multiple Worksheets 2015-06-09

    Hi Can anyone help with this? (Not too sure if this is an Access problem or Excel) I have an Access Query, which I want to export into Excel, but I would like it to create different worksheets based on grouped information; ie, the field i need it gro

  • Excel macro recording window lost 2012-01-14

    I accidently closed this macro recording window from right corner of that window and now when i record new macro there is no windond containing relative and stop recording button. I have tried to return it and no success so my question is that how ca

  • Can multiple OracleIDs be used to access datatase in a single HTMLDB app? 2012-05-28

    In one of the apps we're looking to put together (w/ HTMLDB), we currently control database access using Fine-Grained-Access (with policies on tables that generate WHERE predicates based on the Oracle UserID in the session context). The way we curren

  • Creating Crystal report using MS Access query 2012-07-24

    This is my first post so please help me out !! I am writting an application in VB.NET to print orders. The orders are shown on screen in a listview and the user can select individual orders/range of orders to print. This Access query looks like: PARA

  • Java input screen/form calling MS-Access query 2012-08-30

    My user input forms have been developed in Java. The database is in MS-Access and reports are to be generated in MS-Access. How can my Java button call the MS-Access query that generates an MS-Access report

  • Oracle How do I select top 100 records in query 2012-09-01

    I would like to get only the first 100 or 200 records in a query. In Access query, it is TOP 100, is there an equal in Oracle sql?

  • How to execute MS Access Query using JDBC? 2012-09-11

    I know how to correctly execute SQL statement using con.execute() (where con is type of java.sql.Connection). But how can I execute Microsoft Access Query Object, which require one or more parameters? Do we need to use PrepareStatement ?

  • AS/400 Toolbox for Java - Relative Record Access 2012-09-16

    I'm trying to find information on relative record access using the AS/400 Toolbox for Java. I keep running across references to doing it, but all just say that it can be done, with no reference to how to do it. I've scoured the following: Building Ja

  • Handle Access Query errors from VB 2012-12-14

    when I execute a query from VB I get the following error: DailyEvents can't append all the records in the append query It then asks for user input to continue running the query. My problem is not the error but handling the error from VB so that the q

  • send param from VB code to access query 2013-02-08

    how can i send from the VB code a parameter to access query. ?