[mso] Re: Access Macro

  • From: Glenda Wells <gwells@xxxxxxxxxxx>
  • To: "'mso@xxxxxxxxxxxxx'" <mso@xxxxxxxxxxxxx>
  • Date: Wed, 19 Jun 2002 11:55:04 -0400

I need a single record for any person who has a mail code of AFP and who
does not also have a mail code of ANM or DNS or NOC.

-----Original Message-----
From: Colli, Anthony G [mailto:Anthony.Colli@xxxxxxx] 
Sent: Wednesday, June 19, 2002 11:48 AM
To: 'mso@xxxxxxxxxxxxx'
Subject: [mso] Re: Access Macro


To clarify even more

Do you want all persons with a single mail code of AFP 

OR 

A single record for any person who has a mail code of AFP

OR I suppose 

A combination of the above?

-Anthony

-----Original Message-----
From: Glenda Wells [mailto:gwells@xxxxxxxxxxx]
Sent: Wednesday, June 19, 2002 11:19 AM
To: 'mso@xxxxxxxxxxxxx'
Subject: [mso] Re: Access Macro



I have a table of persons with a mail code of AFP.
The mail code field is many so the person could have a code of AFP and ANM
and DNS and NOC. What I need is a list of persons WITH AFP and NOT WITH ANM
or DNS or NOC as part of their mail record.

-----Original Message-----
From: Colli, Anthony G [mailto:Anthony.Colli@xxxxxxx] 
Sent: Wednesday, June 19, 2002 11:09 AM
To: 'mso@xxxxxxxxxxxxx'
Subject: [mso] Re: Access Macro


Glenda-

A HAVING Clause Specifies which grouped records are displayed in a SELECT
statement with a GROUP BY clause. After GROUP BY combines records, HAVING
displays any records grouped by the GROUP BY clause that satisfy the
conditions of the HAVING clause.

Usually It's used like

HAVING COUNT(something) < 2

I would suspect this is where the error is coming from.

What are you trying to do with this query?

-Anthony


-----Original Message-----
From: Glenda Wells [mailto:gwells@xxxxxxxxxxx]
Sent: Wednesday, June 19, 2002 10:18 AM
To: 'mso@xxxxxxxxxxxxx'
Subject: [mso] Re: Access Macro



I wrote this in Access/SQL but I keep getting a syntax error.

SELECT DISTINCT tblAFP_AllMailCodes.APRMAIL_PIDM INTO tblAFP_PidmWithoutANM
FROM tblAFP_AllMailCodes GROUP BY tblAFP_AllMailCodes.APRMAIL_PIDM HAVING
(((tblAFP_AllMailCodes.APRMAIL_PIDM) Not In (SELECT APRMAIL_PIDM FROM
tblAFP_AllMailCodes WHERE APRMAIL_MAIL_CODE in( "ANM","DNS","NOC")));

-----Original Message-----
From: James LaBorde [mailto:jlaborde@xxxxxxxxx] 
Sent: Tuesday, June 18, 2002 4:53 PM
To: 'mso@xxxxxxxxxxxxx'
Subject: [mso] Re: Access Macro



Glenda,

Could you give the basics of exactly what you are trying to do?  It may not
be necessary to create temporary tables and any time you can do that, it is
a good thing. As far as your current needs, you may not actually need to
create temp tables but use your initial queries as the source in your third
query.  I would have to see what you are trying to do in order to tell you
for sure which way to go.  

As far as learning VBA, there are a couple of good methods. One that will
help with a lot of the basics is to convert your macros.  Access will
convert them for you and you can see what you are doing since you know the
macros.  Second, don't be afraid to find some resources (online or print)
and ask questions of people who may know.  A Third option is to find some
samples and take a look at them.  See what they are doing and how they do
it.

James La Borde
South Western Federal Credit Union

-----Original Message-----
From: Glenda Wells [mailto:gwells@xxxxxxxxxxx]
Sent: Tuesday, June 18, 2002 1:35 PM
To: 'mso@xxxxxxxxxxxxx'
Subject: [mso] Re: Access Macro :VSMail MX2



alternatives are good as I don't insist on Macros.  It's just what I'm
familiar with.  all my attempts at VBA so far have been miserable failures.
I'd hate to turn warnings off.  so, maybe union queries?  I've seen them in
SQL but not in Access/SQL. 

The data is pretty much the same in two of the tables.  The third is like a
minus, pulling records from the second table where there is a matching
record in the first.  The fourth query is just a make-table of that result.
All pretty simple really.

As with most of what I've been trying lately, it makes perfect sense in my
head, just getting it to work in reality is the hard part.


-----Original Message-----
From: James LaBorde [mailto:jlaborde@xxxxxxxxx] 
Sent: Tuesday, June 18, 2002 4:19 PM
To: 'mso@xxxxxxxxxxxxx'
Subject: [mso] Re: Access Macro



Glenda,

If you insist on staying with Macros, there is a macro command SetWarnings.
It turns those warnings off and on.  What you can do is turn  them off, run
your queries and then turn  them back on.  Just remember, if you turn them
off and something bombs your code, you will not have your confirmations on
for append and delete queries.

Just out of curiousity, have you tried to find an alternative to the make
table queries?  They tend to contribute to database bloat.  Is the data they
are generating pretty much the same just coming from different locations? If
so, you may want to look into Union Queries.  This will enable you to
accomplish the same thing without the need for temp tables and reduce the
frequency of compact and repair needs.  If you need help with them, feel
free to drop a note to the list and there are several of us happy to help.

James La Borde
South Western Federal Credit Union

-----Original Message-----
From: Glenda Wells [mailto:gwells@xxxxxxxxxxx]
Sent: Tuesday, June 18, 2002 11:47 AM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Access Macro :VSMail MX2


I don't need anything too complicated but...
 
I have three make-table queries.  A fourth query gets it's result from the
other three.  Then I have a report to display the fourth query.
 
What I need is a macro ??  That runs the 3 make-tables then launches the
report in preview mode without intervention from the user.
 
There used to be keystrokes one could use in a macro to answer the dialog
"...you are about to paste..." but I can't find them now.


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files: http://www.smartgroups.com/vault/msofiles
*************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files: http://www.smartgroups.com/vault/msofiles
*************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files: http://www.smartgroups.com/vault/msofiles
*************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files: http://www.smartgroups.com/vault/msofiles
*************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files: http://www.smartgroups.com/vault/msofiles
*************************************************************


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files: http://www.smartgroups.com/vault/msofiles
*************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files: http://www.smartgroups.com/vault/msofiles
*************************************************************


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files: http://www.smartgroups.com/vault/msofiles
*************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: