
Copy link to clipboard
Copied
I have two tables. The first is called Orders and contains a autonumber field named ID. This field is linked to a field named OrderID in another table named ProductOrders. I am using a submission form with a cfinclude to submit to both tables. There should only be one Orders.ID and numerous ProductOrders.OrderID (but they should be the same number). When I submit the form there are no error messages but the ProductOrders.OrderID is blank and therefore not linked to Orders.ID. What should I be looking for? I have linked the fields in Access in properties and relationships. What else?
1 Correct answer
Yes the sql has to be in a cfquery tag. You'll also have to convert your 2nd cfinsert to a cfquery because the orderid is not coming from a form.
This:
where field1 = the value you just entered
and field2 = the value you just entered
would resemble something like
where saledate = <cfqueryparam value = "#form.saledate#">
and TerritoryManager = <cfqueryparam value = "#form.TerritoryManager#">
etc
If this is a school assignment, you might be ok. If it's for real, it needs a lot of work to userproof it.
Copy link to clipboard
Copied
I would suggest you start a new thread for your question. It is generally considered bad form to tack on a new question to someone else's thread.

