INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

saving forms

saving forms

(OP)
Can anyone help me figure out why when I close my form and it save to the tables it always overwrites the last save which is the first in my table. I believe each should save in a new row.

My tables are as such:

TblPurchaseOrder (a table holding information on items being ordered)
ProductCodeNum (primary key, number)
LastName (text field)
FirstName (text field)
To (text field)
Address (text field)
City_State_ZIP (text field)
DeptNum (number field)
ProductCodeNum (number field)
RequestedBy (text field)
DateRequired (Date/Time)
HowShip Terms (text field)
Date (Date/Time)
PO# (number field)
Total (currency field)

tblPurchaseOrderItems I'M THINKING THAT THIS TABLE IS NOT JOINED RIGHT
ID (Primary Key, autonumber)
ProductCodeNum (number field)
QuantityOrdered (number field)
TotalInventory (number field)
QuantityReceived(number field)
RequestedItems (number field)
PricePerUnit (number field)
TotalInventory (number field)
QuantityReceived(number field)

tblItemList
ID (Primary Key, auto number)
ProductCodeNum
Description
$$/unit Supplier
UOM

tblSupplierList I'M THINKING THIS TABLE IS NOT JOINED RIGHT
ID (Primary Key, auto number)
ProductCodeNum
SupplierName (text field)
Address (text field)
City/State (text field)

Right now I have the following joins:


tblPurchaseOrderNumber.ProductCodeNum related to tblItemList.ProductCodeNum in one to many enforce referential Integrity Cascade update related fields

tblPurchaseOrder.ProductCodeNum related to tblPurchaseOrderItem.ProductCodeNum in one to many enforce referential Integrity Cascade update related fields

tblPurchaseOrder.ProductCodeNum related to tblSupplierList.ProductCodeNum in one to many enforce referential Integrity Cascade update related fields

THIS JOIN SEEMS FINE
tblItemList.ID related to tblPurchaseOrderItem.ProductCodeNum in one to many enforce referential Integrity Cascade update related fields

RE: saving forms

I think you need to learn the basics of Access. Typically a form will open and display the "first" record. Anything you enter into bound controls will update the "first" record. If you want to create a new record, you need to create a new record.

Duane
Hook'D on Access
MS Access MVP

RE: saving forms

(OP)
It was overwriting the first row because the primary key was not autonumber and therefore wasn't creating a new row.
Thanks!

RE: saving forms

Having an autonumber primary key should have nothing to do with overwriting a record in the table.

Duane
Hook'D on Access
MS Access MVP

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close