Re: Can you do this with a macro
From: Ken Snell [MVP] (kthsneisllis9_at_ncoomcastt.renaetl)
Date: 11/16/04
- Next message: Cindy Winegarden: "Re: How to fish out data from .fpt / .cdx files (Foxpro?)"
- Previous message: Chris: "DLookup where clause"
- In reply to: Robert Gillard: "Re: Can you do this with a macro"
- Next in thread: Ken Snell [MVP]: "Re: Can you do this with a macro"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 16 Nov 2004 13:13:21 -0500
I'll review this info and get back to you.
--
Ken Snell
<MS ACCESS MVP>
"Robert Gillard" <bob@mystical.demon.co.uk> wrote in message
news:WHqmd.24820$P7.1821@fe2.news.blueyonder.co.uk...
> Main Overview
> I have a tableX, accessed via a form (from a main menu). The form acts as
a
> type of catalogue and people can mark an item (tick a box) if they wish it
> to be sent to them. A button at the bottom of the form emails a report to
> the dispatch desk.
>
> More Detailed View
> When they select the catalogue from the main menu, a copy of the tableX is
> created. It is this duplicate table (call it tableY) they mark for the
items
> they need. As there are over 400 items to look through, people will often
do
> it in 2 or 3 time slots. At the bottom of the form there is also a button
to
> save the existing request so that they can carry on with it at a later
date.
> This saves tableY until next time.. the problem I have is getting it to
> open. The intended idea was next time they opened the catalogue, Access
> would check to see if there was a partial order in the form of table Y, if
> so it would open it so they can carry on. If not it opens tableX which
> immediately creates tableY and lets them create a fresh / new order.
> Again the intention was, when the order is emailed through a report is
> created and sent with the email, afresh table is created tableZ listing
just
> the ordered items (and in future new orders are appended to the table).
Then
> table Y is deleted.
> As these tables are held on individual pc's (linked by a Network) it is
> intended that tableX will be updated centrally once a week. So I did not
> want to write any data to it, in case it was was lost on the weekly
update.
>
> Sorry it was so long, I hope you are still with me.. I have got all of the
> above working via standard queries or macro's..
>
>
>
>
>
>
> "Ken Snell [MVP]" <kthsneisllis9@ncoomcastt.renaetl> wrote in message
> news:uEtIIg%23yEHA.3656@TK2MSFTNGP09.phx.gbl...
> > OK -
> >
> > Before I jump into a VBA answer, let me ask a few questions about what
> > you're doing. In my experience, it's a bit unusual to need to know if a
> > certain table exists in order to decide which form to use. Typically,
> tables
> > should be relatively static entities, other than temporary tables that
you
> > might create for the purpose of binding a report or form to it until the
> > form or report is closed, and then the table is deleted. In these cases,
> you
> > specifically create a table (needs to be done by a VBA procedure) and
then
> > delete it (also by VBA), so your code/macro would know that the table
> > exists.
> >
> > As you've posted that you're not familiar with VBA, I am a bit puzzled
by
> > why a table might not exist in your database if you're not
> creating/deleting
> > them by using VBA.
> >
> > It's very feasible to have your macro call a VBA function that would
tell
> > you whether a table exists, and then, as I'd mentioned earlier, use that
> > value as part of your test in the macro's Condition expression.
> >
> > But, there may be a different approach to take for what you want to do.
> Can
> > you tell us why a table might/might not exist? What causes the table to
be
> > there or not be there? What are you doing with the form when you open it
> > (regardless of which table exists)?
> >
> > Let's get a better picture of what you're wanting to accomplish, and
then
> > we'll get the best solution for you.
> > --
> >
> > Ken Snell
> > <MS ACCESS MVP>
> >
> >
> >
> > "Robert Gillard" <bob@mystical.demon.co.uk> wrote in message
> > news:4XZld.15105$up1.13323@text.news.blueyonder.co.uk...
> > > Ken,
> > > Regretablely I do not have any experience in this area. Is this a good
> > place
> > > to start ?
> > >
> > > Bob
> > >
> > >
> > > "Ken Snell [MVP]" <kthsneisllis9@ncoomcastt.renaetl> wrote in message
> > > news:ebZ41QryEHA.3708@TK2MSFTNGP14.phx.gbl...
> > > > You cannot do this just with a macro. You'd also need to use a VBA
> > > function
> > > > that identifies if the table exists, and then have the macro call
that
> > > > function and test the result from it. Have you worked with VBA
> > procedures
> > > > before?
> > > >
> > > > --
> > > >
> > > > Ken Snell
> > > > <MS ACCESS MVP>
> > > >
> > > > "Robert Gillard" <bob@mystical.demon.co.uk> wrote in message
> > > > news:c3Rld.14933$up1.9498@text.news.blueyonder.co.uk...
> > > > > I want to run a macro that (in plain English says) if tableA
exists
> > then
> > > > > open formA, if it does not then open formB.
> > > > > I thought this would be a conditional macro using Iif, but I do
not
> > know
> > > > how
> > > > > to say "if the table exists".
> > > > > Can any body help with this please
> > > > >
> > > > > Bob
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: Cindy Winegarden: "Re: How to fish out data from .fpt / .cdx files (Foxpro?)"
- Previous message: Chris: "DLookup where clause"
- In reply to: Robert Gillard: "Re: Can you do this with a macro"
- Next in thread: Ken Snell [MVP]: "Re: Can you do this with a macro"
- Messages sorted by: [ date ] [ thread ]