G
Guest
I'm using this code attached to a button so it inserts some data when I click
the button into another table.
Set MyDb = CurrentDb
Set MyRec = MyDb.OpenRecordset("Select * From Callnotes WHERE False")
MyRec.AddNew
MyRec!Status = "Open" ' You can add other field here in the same way
MyRec!Priority = "1" '
MyRec!Department = "Cancellations" '
MyRec!Subject = "Cancellation Inquiry" '
MyRec!Indicator = "Trouble" '
MyRec!CustomerID = Me.CustomerID
MyRec.Update
THE PROBLEM:
I have another table tied to the above one, called CallNotesDetails, which
basically has one important field called notes, so I can have one record in
callnotes, but many in callnotesdetails (trouble tickets with lots of
responses, etc)
The field that ties callnotesdetails to callnotes is called:
In callnotes (customerID is main field tying it main table) Another field
called CallNotesID, which is then used to tie it to callnotesdetails.
How would you modify the above so it inserts the above information, but then
creates a record in callnotesdetails AS WELL, but using the appropriate
CallNotesID so it is tied to the appropriate record in callnotes?
Thanks
Curtis
the button into another table.
Set MyDb = CurrentDb
Set MyRec = MyDb.OpenRecordset("Select * From Callnotes WHERE False")
MyRec.AddNew
MyRec!Status = "Open" ' You can add other field here in the same way
MyRec!Priority = "1" '
MyRec!Department = "Cancellations" '
MyRec!Subject = "Cancellation Inquiry" '
MyRec!Indicator = "Trouble" '
MyRec!CustomerID = Me.CustomerID
MyRec.Update
THE PROBLEM:
I have another table tied to the above one, called CallNotesDetails, which
basically has one important field called notes, so I can have one record in
callnotes, but many in callnotesdetails (trouble tickets with lots of
responses, etc)
The field that ties callnotesdetails to callnotes is called:
In callnotes (customerID is main field tying it main table) Another field
called CallNotesID, which is then used to tie it to callnotesdetails.
How would you modify the above so it inserts the above information, but then
creates a record in callnotesdetails AS WELL, but using the appropriate
CallNotesID so it is tied to the appropriate record in callnotes?
Thanks
Curtis