Yes, there obviously is a flaw in my design. That is what I am trying
to
correct.
What I have done is created ID nos customized to each table. The way
this
was done was by converting the ID field from the autonumber data/type
to
the
text data/type. While this ID field is now a text field, I joined it
to
the
ID field in the BIGTable, which I also converted to a text field. What
I
seem to have created are child fields. What I want to do is create a
relational database where records can be deleted from both tables at
the
same
time. What advice can you give me here?
By the way, these tables are finite, no more data will be added to
them.
New data will be added by means of new tables in this database. The
information to be added to the default value will be useful if I append
tables together.
Also, is there any way I could send you a copy of my database so you
could
better understand what I am trying to do?
:
When you open the database there is a button for a single-user example
and
for a multi-user example. Clicking on either one will open a form
that
included an Explanation button. Clicking that button produces the
instruction to put the expression into the default value of a text box
bound
to the incrementing field.
If you duplicated records when you placed them into the Big Table you
need
to delete them from both tables. There is probably code that can
accomplish
this, but if you are duplicating records there is almost certainly a
flaw
in
your design. If you had joined tables with a query, deleting records
from
the table would have removed them from the query. Without knowing
anything
about the purpose and structure of your database it is impossible to
offer
specific advice.
What I downloaded appeared to be a database. When I clicked on it,
the
above
discussed information came up.
Since I found a way to get the customized ID and thought I had
joined
each
iD to the ID in the BIGtable, why aren't the records being deleted
from
the
BIGtable when I delete them from the individual tables? In order
for
this
to
happen, does the ID have to be an autonumber?
:
Did you download the sample database?
Maybe something went wrong with my download. Somehow, I missed
this
information. I visited the site you suggested, but found only
minimal
information, including the statement I quoted. I will check
again.
thanks.
:
In the database from Roger's site is the suggestion to put that
expression
into the default value property of a text box bound to that
field.
The
default value comes into play only for a new record. Once the
record
has
been saved (by moving to another record, for instance, the
number
is a
part
of the record unless you specifically change it. Syntax aside,
using
the
top value plus one as the criteria must logically fail, as far
as I
can
see.
Do I put this formula =Dmax["ProductID", "Product"]+1 in the
criteria
row
of
a query? I did this and got an error message saying The
expression
you
entered contains invalid syntax or you need to enclose your
text
data
in
quotes. You may have entered an invalid comma or omitted
quotation
marks...
I looked up your reference and followed your directions as to
creating
an
autonumber field, then changing the data type to number. Then
I
entered
the
expression from your reference in the criteria row, hit run
and
got
this
error message. Please help. Thanks.
:
If I have seen before that you have several tables, etc. I
have
forgotten
it. If you are seeking help it's best not to send people on
a
search
for
the problem.
You could add an autonumber field, which will number in the
order
you
want
for your existing records. Then, change the data type to
Number,
and
increment it for new records with something like the method
here:
http://www.rogersaccesslibrary.com/download3.asp?SampleName=AutonumberProblem.mdb
I can't even guess what you mean by appending the records
into a
comprehensive table and connecting them relationally. I can
say
that
each
table should contain information about a single entity. For
instance,
in
a
school database Students and Courses need to be in separate
tables.
message
As you have seen before, I have several tables of contact
numbers
in
my
database. For each table, I want to put in a customized ID
beginning
with
the name or short description of the table. For example,
the
newspaper
table
would begin with an ID of nwp1, nwp2 and so on for each
record
in
the
table.
Another example would be govt1, govt2, govt3, etc for each
record
in
the
table. These tables have no autonumber ID now or any type
of
ID.
My intention is to append each table to a comprehensive
table
and
connect
them relationally. This means each table id will be in the
comprehensive
table and joined.
How do I make customized IDs?