Re: Assigning a table name to a variable

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I'm not there, and this seems more complex than I can grasp via this
mechanism. You may want to see if there are any folks local to you who
could take a look, or you may decide to hire some consulting time to review
and recommend.

I would point out that the solution to your "potentially multiple users
ordering the report simultaneously" may be simply to add a userID field to
the permanent table. Having the same table name each time will obviate at
least one of your issues.

--
Best of luck on your project

Jeff Boyce
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/


"dave b via AccessMonster.com" <u19985@uwe> wrote in message
news:5f5bd29a8c8bf@xxxxxx
The table holds the values selected by the user to run the report.
Initially, I did use a permanent table, and empty it. However, should
multiple users run the same report at the same time, problems would arise
by
using the same table. I decided on creating a table each time the report
is
run, with a primary key to ensure no dups. Then deleting it.

Also, the table may or may not be used. The user has the option of
selecting
a list (use table), a range, or all (don't use table for latter two).

I did use breakpoints, but still could not determine why the where
argument
was not being used. I used a variable to create the where; then out of
frustration, I hardcoded the value in the DoCmd.

At first, I had the report call a module, which created a filter. It
worked
fine. But then, I was reading threads on this site, and everybody was
saying
it was better to use the where.

My solution to the problem was to create the recordsource value in the
Open
event of the report. There I could start with the main query, then add on
JOINs and WHEREs as needed, depending on the parameters selected by the
user
(taken from the form). Complicated, but it seems to work.

If there is a simple and elegant solution, I wouldn't mind hearing it.
But I
don't using ugly to get the job done.

Jeff Boyce wrote:
Dave

I guess I don't have the "big picture"...

Among my questions:
? why change the name of the table each time, when you'll just delete
it
later?
? are you saying you use the form to select multiple product codes to
include (or select by) in your query/report?
? why use a temp table when you could use a permanent table and simply
empty it out before starting to fill it?
? have you inserted a breakpoint in the construction of your SQL/WHERE
clause and inspected what is actually being used when you try the ='AMP'?

I'm populating the product code table using a drop down list. How
would
that work using a query?
[quoted text clipped - 9 lines]
What I'm getting is all records, when I expect to get just the
record with
product codes of AMP.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200604/1

.



Relevant Pages

  • Re: Offline folders - prevent synchronization for all profiles
    ... When multiple users are using the same laptop to connect to the corp domain. ... offline folders which lead to a long log off time. ... Microsoft offers several ways for you to send comments or suggestions about ... Should a suggestion be implemented, ...
    (microsoft.public.windows.group_policy)
  • Re: Remote Desktop : Connecting to a WinXP machine ?
    ... Microsoft doesn't want ... multiple users on a single PC at a time. ... This will prevent my remote friend from actually seeing me control his ... he won't be able to watch me doing it, ...
    (Ubuntu)
  • Re: Any way to control sub-reports?
    ... multiple users a save may not even be possible due to file locks. ... "Alp Bekisoglu" wrote in message ... is it necessary that the report be saved or could I just ... >> Steve Arbaugh ...
    (microsoft.public.access.reports)
  • Emailing to multiple people
    ... I have report that I want to email to multiple users that give them the ... Anyway I can get this done without knowing VBA very well? ...
    (comp.databases.ms-access)
  • Re: Report too slow
    ... Do you have multiple users running the same front-end or does each user have ... This helped the speed up the report when filtering for the individual ... for employee performance and the coach may pull 1 employee or his/her ... The union query is then joined to a table in the rptQuery. ...
    (microsoft.public.access.reports)