The best approach?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please excuse my terminology or even my literature concerning my dilemma with
a cancellation report I need. The setting; two tables with a many-to-many
relationship through a linking table that I believe is correct. The dispatch
(tbl) has ID#, dates, times, and where the appt is going to happen. The
cancel (tbl) has cancel # and cancel date, and cancel time. What would be
the correct to general a report out of this setting. The linking table has
it's own ID#, dispatch ID, and cancel #. I tried to query just the two tables
but the autonumber will not let me enter in the value that is already in play.
 
AbstractGofer said:
Please excuse my terminology or even my literature concerning my dilemma with
a cancellation report I need. The setting; two tables with a many-to-many
relationship through a linking table that I believe is correct.

Why many-to-many? Are you going to have one [dispatch] record get
cancelled several times? And are you also going to let several
[dispatch] records be cancelled by one [cancel] record? I'm afraid I
don't understand what you're modeling here.
The dispatch
(tbl) has ID#, dates, times, and where the appt is going to happen. The
cancel (tbl) has cancel # and cancel date, and cancel time. What would be
the correct to general a report out of this setting. The linking table has
it's own ID#, dispatch ID, and cancel #. I tried to query just the two tables
but the autonumber will not let me enter in the value that is already in play.

That's correct -- the Autonumber field is used to identify a specific
record, and it shouldn't be changed. If you want to replace some record
with some other record, you could delete the first one, add the second
one, then link the new (second) record to whatever records in other
tables it needs to link to.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 
The reason for a many-to-many is because (unless I have it all wrong?) I need
input data in all the fields from the cancel table and that, that particular
dispatch booking gets cancel out along with its entirety.

The goal is to make the cancellation procedure automated with a push of a
button through a query.
--
When you put water in a cup, the water becomes the cup.
When you put water in a tea pot, the water becomes the tea pot.
Be like water and adapter to every and any situation.


Vincent Johns said:
AbstractGofer said:
Please excuse my terminology or even my literature concerning my dilemma with
a cancellation report I need. The setting; two tables with a many-to-many
relationship through a linking table that I believe is correct.

Why many-to-many? Are you going to have one [dispatch] record get
cancelled several times? And are you also going to let several
[dispatch] records be cancelled by one [cancel] record? I'm afraid I
don't understand what you're modeling here.
The dispatch
(tbl) has ID#, dates, times, and where the appt is going to happen. The
cancel (tbl) has cancel # and cancel date, and cancel time. What would be
the correct to general a report out of this setting. The linking table has
it's own ID#, dispatch ID, and cancel #. I tried to query just the two tables
but the autonumber will not let me enter in the value that is already in play.

That's correct -- the Autonumber field is used to identify a specific
record, and it shouldn't be changed. If you want to replace some record
with some other record, you could delete the first one, add the second
one, then link the new (second) record to whatever records in other
tables it needs to link to.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 
AbstractGofer said:
The reason for a many-to-many is because (unless I have it all wrong?) I need
input data in all the fields from the cancel table and that, that particular
dispatch booking gets cancel out along with its entirety.

"Many-to-many" doesn't refer to how many fields you have, but rather to
how many records in one table link up to a record in another table. For
example, one [student] may be enrolled in several [class]es, and one
[class] may have several [student]s enrolled in it. That would be many
to many.

For the record's "entirety", you're just referring to all the fields in
the record, I think. And when you refer to a record in an Access Table,
you are automatically referring to all of its fields. So I think you
are worrying unnecessarily.

To decide how to link them, you need to determine how many [cancel]
records you want to allow to match one [dispatch] record, and vice versa.

If you will never have more than one of each kind of record attached to
the corresponding record in the other table, then that is a one-to-one
relationship, and in that case you might want to combine all the fields
into each record in just one table. Or, if several of the fields have
similar types, such as [dispatch].[date] and [cancel].[date], you could
use just one Table for all of them and add a new field that determines
what kind of record it is: one value for "dispatch" records and a
different value for "cancel" records. If you did that, the
[dispatch].[date] field would identify the date of "dispatch" event if
it's a "dispatch" record, and the same [dispatch].[date] field would
contain the date of the "cancel" event if it's a "cancel" record. If
"dispatch" records have a field that "cancel" records don't have, you
could just leave it empty (=Null value) in a "cancel" record.

If you did combine two Tables linked as 1:1 into a single Table, though,
I think you'd want to rename the combined Table to something like
[T_Appointments] to give an idea of what kind of information is inside it.

I think any of the choices I mentioned (1:1 Tables, Table with separate
fields, or Table with shared fields and a new field identifying type)
might work. But I see no way for a many-to-many relationship to work,
unless the records mean something different from what they seem to mean.
The goal is to make the cancellation procedure automated with a push of a
button through a query.

You'll be able to add that feature *after* you have a table design that
reflects what you're trying to do. It's not difficult to add Queries,
nor to set up buttons to run them.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 
You have too many tables! You only need one:
TblAppointment
AppointmentID
AppointmentDate
AppointmentTime
AppointmentLocation
AppointmentCancelDate
AppointmentCancelTime

For your report, create a query based on this table and set the criteria for
AppointmentCancelDate to Is Not Null. The query will only return cancelled
appointments. Build your report from this query.
 
I tried to query just the two tables but
but the autonumber will not let me enter
in the value that is already in play.

Please clarify. I do not understand what you mean by this.

Surely you aren't trying to use AutoNumber Fields for the DispatchID and
Cancel# in the linking Table, are you? If they are obtained from a regular
AutoNumber Field, they can, and should, be stored in Long Integer Fields.

Larry Linson
Microsoft Access MVP
 
Thank you all for the much needed help.

I believe I'm misunderstanding the basics but I trying to run the query from
the two tables and pull the autonumber from those transaction with their
number identifiers. These are the autonumber, which are auto generated but
once I run the query of the tables the autonumber (values) are gone.

For my cancellation dilemma I will try using the method of making them into
a single table.
 
AbstractGofer said:
Thank you all for the much needed help.

I believe I'm misunderstanding the basics but I trying to run the query from
the two tables and pull the autonumber from those transaction with their
number identifiers. These are the autonumber, which are auto generated but
once I run the query of the tables the autonumber (values) are gone.

There is no reason for the Autonumber values to go away. They should be
about as permanent as any fields in the record, since their purpose is
to act as an identifier for the record, a shortened way of referring to
the record from some other Table.
For my cancellation dilemma I will try using the method of making them into
a single table.

If you have trouble with that, you might post here a list of the fields
in your Table(s), maybe with a description of what each one means or how
you think it should be used.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top