Similar Threads:
1.Null & Is Not Null Query Question
I have a query with 3 fields of [EmployeeID], [FirstDay] and [LastDay]
(Firstday and LastDay are date fields) I am trying to get my query to give
the results of the Missing dates for both the Firstday and Lastday. Some
employees may have the firstday or the lastday missing or both. I have been
experimenting with Is Null and Is not null or both in the criteria giving
partial results. If I put Is null in the Firstday criteria only, I do get a
list of employees missing the Firstday dates. If I also put Is Null in the
Lastday criteria, All I get is employees with only the Firstday and the
lastday dates missing, but not employees with either/or the firstday and
lastday missing. Please help..Randy
2.MS Access 2003 CrossTab Query Question using VBA--Item not found i
When running a crosstab query, one cannot tell ahead of time what columns are
going to appear based on parameter criteria fed to an underlying query that a
crosstab query is created from. That, of course, is the dynamic nature of
crosstab result sets. However, if I know all the possible values for the
columns because the field the column is based on has a finite number of
possible values, how can I test if a particular column is present using VBA?
With the usual construct of rs![X], where X is one of the possible column
values, if that value does not appear when the crosstab is run, a debug of
that if statement will show the error message that "item not found in this
collection". MY QUESTION IS:
how can I error trap for this? That is, if I want to test for rs![X].value
and it does not exist, then the code just skips by if on error resume is
used; otherwise the cdoe breaks. I would ideally like to have another IF
statement outside of the one above that checks for the existance of that
column, and I do not know how to do this. Is there an error code associated
with "item not found in this collection" that I can look for? If so, what
function would I use to test for the error condition and what value would it
need to equal for ""item not found in this collection"???? And if this is
not a possible or best approach, how should I detect/look for a particular
column in a crosstab query when the query is run in code and the recordset is
processed in code looking for a specific resulting column and its value???
Thanks to anyone who can help me!!!!
Mike S.
3.MS Access 2003 CrossTab Query Question using VBA--Item not fou
There is no rs.Field in the collection. There is an rs.Fields with Append,
Count, Delete, and Refresh methods associated with it. What am I missing
here?
"MGFoster" wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> What you're really looking for is the name of the Field (it is the
> object in the Fields collection that is not being found); that is easily
> found:
>
> If rs.Field = "name of field" Then
> ' do something w/ the field
> End If
>
> --
> MGFoster:::mgf00 <at> earthlink <decimal-point> net
> Oakland, CA (USA)
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGP for Personal Privacy 5.0
> Charset: noconv
>
> iQA/AwUBQ9F1ioechKqOuFEgEQLyZQCg43Zl6AO+KLyP7okBGeoxdKvgTV0AoKDr
> vAzScW9oG0Ia1fBAJaUi4xyz
> =6nhz
> -----END PGP SIGNATURE-----
>
>
> Mike S. S. wrote:
> > When running a crosstab query, one cannot tell ahead of time what columns are
> > going to appear based on parameter criteria fed to an underlying query that a
> > crosstab query is created from. That, of course, is the dynamic nature of
> > crosstab result sets. However, if I know all the possible values for the
> > columns because the field the column is based on has a finite number of
> > possible values, how can I test if a particular column is present using VBA?
> > With the usual construct of rs![X], where X is one of the possible column
> > values, if that value does not appear when the crosstab is run, a debug of
> > that if statement will show the error message that "item not found in this
> > collection". MY QUESTION IS:
> >
> > how can I error trap for this? That is, if I want to test for rs![X].value
> > and it does not exist, then the code just skips by if on error resume is
> > used; otherwise the cdoe breaks. I would ideally like to have another IF
> > statement outside of the one above that checks for the existance of that
> > column, and I do not know how to do this. Is there an error code associated
> > with "item not found in this collection" that I can look for? If so, what
> > function would I use to test for the error condition and what value would it
> > need to equal for ""item not found in this collection"???? And if this is
> > not a possible or best approach, how should I detect/look for a particular
> > column in a crosstab query when the query is run in code and the recordset is
> > processed in code looking for a specific resulting column and its value???
> >
> > Thanks to anyone who can help me!!!!
> >
> > Mike S.
>
4.access query question using not " "
need to say not with about eight items
can get it to work with one item but not more than one
how do i do this?
5.Append if not already existing query question?
Remember seeing a post a while back from someone who wanted to add to a
table only if the data didn't already exist.
Someone suggested a type of query called an "Up" something or other. Can't
remember - could someone refresh my memory on this please?
Thanks
6. Access 2007 Query question - Unmatched not return results wanted
7. question on tab order...this is not a std question
8. Forms Question or Query Question..