Connecting Tech Pros Worldwide Forums | Help | Site Map

Help with union of 2 tables

Mauro Baraldi
Guest
 
Posts: n/a
#1: Nov 12 '05
Hy,

I have 2 tables whith some fields distincts.

1° Table: Clients
Fields: Name, Adress, Fone, E-mail, Stats (this is a binary field -
yes/no).

2° Table: Events
Fields: Event, Date, Hour, Cost.

I need to create some 'function', that for each event than I add in
table Events, I generate a report with each registry of Clients that
field Stats is equal 'yes' print with this event than I add. If stats
is no it not show.

Example

------------------Report Example - Start-------------------
Name: Mauro Baraldi
Adress: Paulista Avenue | Fone: +55 11 0000-1111
email: my.email@my.provider.com | Stats: Yes
Event: Movie (MI2) | Date: 01/02/04 | Hour: 18:00 h
Coast: U$$ 5,00
------------------Report Example - End---------------------

Can somebody help-me PLEASE !!

Thanks.

Pieter Linden
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Help with union of 2 tables


mauro.baraldi@bol.com.br (Mauro Baraldi) wrote in message news:<daf62359.0402041238.3940935c@posting.google. com>...[color=blue]
> Hy,
>
> I have 2 tables whith some fields distincts.
>
> 1° Table: Clients
> Fields: Name, Adress, Fone, E-mail, Stats (this is a binary field -
> yes/no).
>
> 2° Table: Events
> Fields: Event, Date, Hour, Cost.
>
> I need to create some 'function', that for each event than I add in
> table Events, I generate a report with each registry of Clients that
> field Stats is equal 'yes' print with this event than I add. If stats
> is no it not show.
>[/color]
Your example is a simple report - but you need to be able to somehow
join the Client to the Event. Can each client sign up for more than
one event? Then it looks like you need a join table. (ClientID,
EventID) and then you join something like this

Clients-----ClientEvents-----Events

Then you can specify a WHERE clause in the Open Report event which
will fiter for Stats=yes.
Closed Thread


Similar Microsoft Access / VBA bytes