Adding Record to Table

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

Guest

I have a form in which a user selects a vendor for a purchase order. Once
they select the vendor, they click a command button that opens a form where
they fill out the order information. The vendor ID is not being added to the
purchase order table in which the purchase order form is based. The
relationship between the vendor and purchase order tables is correct. My
question is, can I have it add the vendor ID or name to the purchase order
table when they user clicks on the command button? There is a place for
vendor ID in the purchase order table. Is there something else I need to do?
Please Help!

Thanks!
 
jped said:
I have a form in which a user selects a vendor for a purchase order.
Once they select the vendor, they click a command button that opens a
form where they fill out the order information. The vendor ID is not
being added to the purchase order table in which the purchase order
form is based. The relationship between the vendor and purchase
order tables is correct. My question is, can I have it add the
vendor ID or name to the purchase order table when they user clicks
on the command button? There is a place for vendor ID in the
purchase order table. Is there something else I need to do? Please
Help!

Thanks!

Table relationships do not automatically create records or fill in field values.
They impose rules on records and field values that your application or your user
enters. If you are opening a form and neither your code nor the user is setting
a value for the VendorID than you won't get one.

Is VendorID not set as a required field in your orders table? Sounds like it
should be.
 
Hi jped,

"Once they select the vendor, they click a command button that opens a form
where
they fill out the order information."

What I usually do is add a text box to the form that opens called
txtVendorID.
Then Set The Defaul Value=[Forms]![FrmVendor].[VendorID]
This way the Vendor ID will be set when the form opens to a new record.

Hope This Helps
Larry
 
jped said:
I have a form in which a user selects a vendor for a purchase order. Once
they select the vendor, they click a command button that opens a form where
they fill out the order information. The vendor ID is not being added to the
purchase order table in which the purchase order form is based. The
relationship between the vendor and purchase order tables is correct. My
question is, can I have it add the vendor ID or name to the purchase order
table when they user clicks on the command button? There is a place for
vendor ID in the purchase order table. Is there something else I need to do?
Please Help!

Thanks!
Look at the OpenArgs Property. This will allow you to pass information
to the second form.

Ron
 
Larry,

Sorry it has taken me so long to write back.


I have a text box that pulls this information to the second form. What I
need is for it to store VendorID in my actual PurchaseOrder table. I have a
field for VendorID, but nothing is being placed in the table. Any thoughts?

Thanks
Larry Tompkins said:
Hi jped,

"Once they select the vendor, they click a command button that opens a form
where
they fill out the order information."

What I usually do is add a text box to the form that opens called
txtVendorID.
Then Set The Defaul Value=[Forms]![FrmVendor].[VendorID]
This way the Vendor ID will be set when the form opens to a new record.

Hope This Helps
Larry


jped said:
I have a form in which a user selects a vendor for a purchase order. Once
they select the vendor, they click a command button that opens a form
where
they fill out the order information. The vendor ID is not being added to
the
purchase order table in which the purchase order form is based. The
relationship between the vendor and purchase order tables is correct. My
question is, can I have it add the vendor ID or name to the purchase order
table when they user clicks on the command button? There is a place for
vendor ID in the purchase order table. Is there something else I need to
do?
Please Help!

Thanks!
 
Back
Top