Passing values getting lost

dynamictiger

Registered User.
Local time
Today, 15:15
Joined
Feb 3, 2002
Messages
270
I have two forms set up. The first form is a client job booking form. The second is a kitset job form.

If you choose you can add a kitset job to a client job. When you click add on the kitset button form ADO updates the underlying recordset for the stock tables and updates the field for the labour time. All this is fine.

The following line

Form_frmServJob.JobDescription = Nz(Form_frmServJob.JobDescription) & vbCrLf & Me.KitsetDescription

Appears to work in that it adds the kitset description to the job description field on the form. However, when I close and reopen the job form the job description is not there.:confused:

The rest of the form saves fine.

The field job description is a memo field although I cannot see why this would affect the outcome.
 
Guessing: Is the memo field bound to a field in a table? Have you tried saving the record after the copy?
Code:
Form_frmServJob.JobDescription = Nz(Form_frmServJob.JobDescription) & vbCrLf & _ 
Me.KitsetDescription
DoCmd.runcommand acCMdSaverecord
More: you can experiment by changing the memo field to a text field and running the same code. And, further, you could delete the memo field and then add it back and hope for the best...

Regards,
Tim
 
By the syntax you are using to refer to the form field I am guessing that you are attempting to refer to a form field on a closed form. Forms don't store records. Records are atored in tables. If you want to update a field value, you'll need to update the table using a query or DAO or ADO code.
 

Users who are viewing this thread

Back
Top Bottom