Updates

  • Thread starter Thread starter HServ
  • Start date Start date
H

HServ

Here's an easy one:
I have three tables. One has all the names and addresses in the database.
The other two have the same information but split into two categories, say
girls and boys. You can update any of te lists but the changes don't seem to
show up in the other tables. The easy answer seems to be creating a
relationship between the Primary Keys of the tables but that doesn't seem to
be working. Perhaps there is more to it? Thank you
 
Delete the two tables once you have set a marker in the main one to denote
the different types.

Add a Yes/No field, Yes=Girls/No=Boys. Update the marker to yes in the main
table using the Girls table.

NEVER store duplicate data unless you can manage the database consistency at
engine level, (SQL Server/DB2).
 
HServ said:
Here's an easy one:
I have three tables. One has all the names and addresses in the
database. The other two have the same information but split into two
categories, say girls and boys. You can update any of te lists but
the changes don't seem to show up in the other tables. The easy
answer seems to be creating a relationship between the Primary Keys
of the tables but that doesn't seem to be working. Perhaps there is
more to it? Thank you

The answer is to use a single table with one field indicating mail or
female.
 
What if I have more than 2 "categories," and yes/no won't work. For example,
I have a list of songs and want to split them into 5 different styles of
music. I want to be able to open a list of all songs or open a list of just
jazz songs without having to run a query every time. Thanks
 
HServ said:
What if I have more than 2 "categories," and yes/no won't work. For
example, I have a list of songs and want to split them into 5
different styles of music. I want to be able to open a list of all
songs or open a list of just jazz songs without having to run a query
every time. Thanks

Then use a field that holds as many values as you need (1, 2, 3, 4, etc..)
and that can be joined to another table that gives Text descriptions for
each number. That works if the choices are mutually exclusive. In your
music example a song can easily belong in more than one category so you need
three tables. One for the tracks, one for the categories and a junction
table that stores the key combinations from the other two.

This is definitley done with queries and ONE set of data. Going around
creating multiple tables with the same structures is definitely a no-no.
 
I'm guessing this means a lookup wizard and that will work fine. But the
users won't want to run a query every time they open the database. I can't
see any other way for the seperate categories to be displayed without
running the query every time or creating a new table for each category. Can
I make a link, something like "View Jazz Only," and then it runs the query
without them knowing? Thanks so much for the help.
 
HServ said:
I'm guessing this means a lookup wizard and that will work fine. But
the users won't want to run a query every time they open the
database. I can't see any other way for the seperate categories to be
displayed without running the query every time or creating a new
table for each category. Can I make a link, something like "View Jazz
Only," and then it runs the query without them knowing? Thanks so
much for the help.

You can make a switchboard and list "Jazz only? on a button and that can
run the query or form (based on the query) for Jazz. There are a number of
other ways of doing it as well. The user will like it.
 
I'm guessing this means a lookup wizard and that will work fine. But the
users won't want to run a query every time they open the database. I can't
see any other way for the seperate categories to be displayed without
running the query every time or creating a new table for each category. Can
I make a link, something like "View Jazz Only," and then it runs the query
without them knowing?

Absolutely. Use a Parameter Query. Have a field in your table for the
category; on the Form that opens automatically (Tools... Startup...
select your startup form) put a Combo Box or Listbox allowing the user
to select a category.

Have a Query with a criterion on the category field

=Forms!frmSwitchboard!lstCategories

using the names of your form and your listbox.

Base a Form on this query (showing the information that you want to
see) and put a command button on the switchboard form to open it, or
use the listbox's AfterUpdate event to do so.

John W. Vinson[MVP]
 

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