using query and form to insert records in a budget table for users

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

Guest

I want to use two tables in a database to track spend for each user. I have
created a user identity table and a spend table. These are joined with a one
to many relationship, using a "user id" in the user table and "budget id" in
the spend table. I then created a form to allow me to insert new spend
records for each user. This works in part, but each time I enter a new spend
record using the correct customer id, I find I have also created a new user
in the user table. How can I correct this? Please help, it is driving me mad!
 
You haven't described the form you are using. A typical approach for a
one-to-many relationship like what you've described is to use a main form,
bound to the user table, and a subform, bound to the [Spend] table. The
connection between the two MUST be a common field, so I'm confused how you
can use a UserID and a BudgetID to connect -- these sound like they hold two
different facts.

In a one-to-many relationship, the "many" table needs to have a field
(foreign key) that holds a value that's in the "one" table. It answers the
question, "which User does this Spend record apply to?".

--
Good luck

Jeff Boyce
<Access MVP>

osullipa said:
I want to use two tables in a database to track spend for each user. I have
created a user identity table and a spend table. These are joined with a one
to many relationship, using a "user id" in the user table and "budget id" in
the spend table. I then created a form to allow me to insert new spend
records for each user. This works in part, but each time I enter a new spend
record using the correct customer id, I find I have also created a new user
in the user table. How can I correct this? Please help, it is driving me
mad!
 
Back
Top