V
Vance
This is probably very simple, but I can't figure it out...my
experience with Access is very limited. I work for a large school
that orders many supplies once a month. I created a SupplyItems table
that has a Yes/No field that the user can select if they need to
re-stock a particular item. The teachers purchase many different
items from many different vendors, creating one big list all at the
same time.
I then created an Append query to append the details for all the
selected records into a tblShoppingList, which is the basis of our
"Shopping List" report. The tblShoppingList is basically a
"PurchaseOrderDetails" table, but as the table is currently
structured, the fldShoppingListID is an autonumber that generates a
new number for EVERY item in the list:
tblShoppingList:
fldShoppingListID (PK, autonumber)
fldPONumber (FK for tblPurchaseOders… which is now empty)
fldOrderDate (created using a default value of today's date)
fldVendorID
fldItemName
fldUnitCost
fldQuantity ... etc.
I also created a tblPurchaseOrders table that relates to the
ShoppingList table where I want to assign one PO# for each vendor on a
given date (not a separate number for each item):
tblPurchaseOrders:
fldPurchaseOrderID (PK)
fldPO_Date
fldPO_VendorID
The two tables are linked (many to one) on the fldPONumber and
fldPurchaseOrderID fields because I do understand that they must be
linked this way, but... this is my problem... the fldPONumber in the
tblShoppingList table is empty because I can't figure out how to put a
number IN there at the time the teachers are selecting the items to
order (I really can't trust them to keep up with a unique number, and
type it into the field for every item they decide to order).
Therefore, I do not have a number to append to the tblPurchaseOrders
table that will provide the necessary Purchase Number link.
I thought about automatically generating a number that is a
combination of the current date and the vendor ID and appending that,
but Access gave me a conversion error… (I used CLng([Date()] &
[fldVendorID]) Evidently this was wrong).
Am I explaining my problem clearly enough? I feel like I am going
about this backwards because I am creating my PurchaseOrderDetails
table BEFORE I am creating my PurchaseOrders table.
Does anyone know how I should do this?
Thanks,
Everette
experience with Access is very limited. I work for a large school
that orders many supplies once a month. I created a SupplyItems table
that has a Yes/No field that the user can select if they need to
re-stock a particular item. The teachers purchase many different
items from many different vendors, creating one big list all at the
same time.
I then created an Append query to append the details for all the
selected records into a tblShoppingList, which is the basis of our
"Shopping List" report. The tblShoppingList is basically a
"PurchaseOrderDetails" table, but as the table is currently
structured, the fldShoppingListID is an autonumber that generates a
new number for EVERY item in the list:
tblShoppingList:
fldShoppingListID (PK, autonumber)
fldPONumber (FK for tblPurchaseOders… which is now empty)
fldOrderDate (created using a default value of today's date)
fldVendorID
fldItemName
fldUnitCost
fldQuantity ... etc.
I also created a tblPurchaseOrders table that relates to the
ShoppingList table where I want to assign one PO# for each vendor on a
given date (not a separate number for each item):
tblPurchaseOrders:
fldPurchaseOrderID (PK)
fldPO_Date
fldPO_VendorID
The two tables are linked (many to one) on the fldPONumber and
fldPurchaseOrderID fields because I do understand that they must be
linked this way, but... this is my problem... the fldPONumber in the
tblShoppingList table is empty because I can't figure out how to put a
number IN there at the time the teachers are selecting the items to
order (I really can't trust them to keep up with a unique number, and
type it into the field for every item they decide to order).
Therefore, I do not have a number to append to the tblPurchaseOrders
table that will provide the necessary Purchase Number link.
I thought about automatically generating a number that is a
combination of the current date and the vendor ID and appending that,
but Access gave me a conversion error… (I used CLng([Date()] &
[fldVendorID]) Evidently this was wrong).
Am I explaining my problem clearly enough? I feel like I am going
about this backwards because I am creating my PurchaseOrderDetails
table BEFORE I am creating my PurchaseOrders table.
Does anyone know how I should do this?
Thanks,
Everette