!DelayHrs3 = DelayHrs3.Value !DelayPay3 = DelayPay3.Value !LayOverRate = LayOverRate.Value !LayoverHrs = LayoverHrs.Value !LayoverPay = LayoverPay.Value !OutOfRoute = OutOfRoute.Value !OutOfRoutez = OutOfRoutez.Value !Taxi = Taxi.Value !Tolls = Tolls.Value !ATM = ATM.Value !燃料=燃料。价值 !杂项= Misc.Value !TotalReimbursements = TotalReimbursements.Value !Notes = Notes.Value 。更新 。关闭 结束 Err_Command226_Click: MsgBox Err.Description 退出Sub 结束子 =============== =================================== =========== 提前感谢您的帮助。 扭矩!Hi,Im wondering if anyone can help me with a problem.I have a form with more than 50 unbound fields.Some of the fields will be blank from time to time.This seems to be where im having trouble.I have tried keeping some of the fields bound and when I use the save buttonit has been saving as 2 different records. This is unacceptable.This is what I have, can anyone help me out with this?================================================== =============Private Sub Command226_Click()On Error GoTo Err_Command226_ClickDim Dbs As DatabaseDim RstFrmAddEntry As RecordsetDim QryFrmAddEntry As StringSet Dbs = OpenDatabase("C:\LOCATION OF MY FILE\File.mdb")QryFrmAddEntry = "Table1"Set RstFrmAddEntry = Dbs.OpenRecordset(QryFrmAddEntry, dbOpenDynaset)With RstFrmAddEntry.AddNew!TripNumber = TripNumber.Value!DateDispatched = DateDispatched.Value!DateCompleted = DateCompleted.Value!Advance = Advance.Value!TripType = TripType.Value!MilesPaid = MilesPaid.Value!Origin = Origin.Value!TripPay = TripPay.Value!Drop1Loc = Drop1Loc.Value!Drop1Type = Drop1Type.Value!Drop1Rate = Drop1Rate.Value!Drop1Miles = Drop1Miles.Value!Drop1Pay = Drop1Pay.Value!Drop2Loc = Drop2Loc.Value!Drop2Type = Drop2Type.Value!Drop2Rate = Drop2Rate.Value!Drop2Miles = Drop2Mile.Value!Drop2Pay = Drop2Pay.Value!Drop3Loc = Drop3Loc.Value!Drop3Type = Drop3Type.Value!Drop3Rate = Drop3Rate.Value!Drop3Miles = Drop3Miles.Value!Drop3Pay = Drop3Pay.Value!Drop4Loc = Drop4Loc.Value!Drop4Type = Drop4Type.Value!Drop4Rate = Drop4Rate.Value!Drop4Miles = Drop4Miles.Value!Drop4Pay = Drop4Pay.Value!UndeckPay = UndeckPay.Value!ReDeckPay = ReDeckPay.Value!DelayType1 = DelayType1.Value!DelayHrs1 = DelayHrs1.Value!DelayPay1 = DelayPay1.Value!DelayType2 = DelayType2.Value!DelayHrs2 = DelayHrs2.Value!DelayPay2 = DelayPay2.Value!DelayType3 = DelayType3.Value!DelayHrs3 = DelayHrs3.Value!DelayPay3 = DelayPay3.Value!LayOverRate = LayOverRate.Value!LayoverHrs = LayoverHrs.Value!LayoverPay = LayoverPay.Value!OutOfRoute = OutOfRoute.Value!OutOfRoutez = OutOfRoutez.Value!Taxi = Taxi.Value!Tolls = Tolls.Value!ATM = ATM.Value!Fuel = Fuel.Value!Misc = Misc.Value!TotalReimbursements = TotalReimbursements.Value!Notes = Notes.Value.Update.CloseEnd WithErr_Command226_Click:MsgBox Err.DescriptionExit SubEnd Sub================================================== ===========Thanks in advance for your help.Torque!推荐答案痛苦愚蠢的问题,但为什么不设置必要的属性 的字段需要填写False,将表格 绑定到表格,然后用它完成?painfully stupid question, but why not just set the Required propertyof the fields that don''t need to be filled in to False, bind the formto the table, and be done with it? On 2006年4月15日17:54:31 -0700, pi********@hotmail.com 写道:On 15 Apr 2006 17:54:31 -0700, pi********@hotmail.com wrote:痛苦愚蠢的问题,但为什么不设置不需要填写False的字段的必需属性,绑定表单painfully stupid question, but why not just set the Required propertyof the fields that don''t need to be filled in to False, bind the formto the table, and be done with it? 没有意识到有任何愚蠢的问题。 既然你似乎知道这么多,怎么用这样的方式向我解释 ,我可能会理解你的智慧。 谢谢 TORQUEDidn''t realize there were any stupid questions.Since you seem to know so much, how about explainin this to me in such a waythat I might understand someone of your inteligence.ThanksTORQUE 2006年4月15日星期六21:01:03 -0400,TORQUE& LT;为了**** @ home.org>写道:On Sat, 15 Apr 2006 21:01:03 -0400, TORQUE <To****@home.org> wrote: 2006年4月15日17:54:31 -0700, pi * *******@hotmail.com 写道:On 15 Apr 2006 17:54:31 -0700, pi********@hotmail.com wrote:痛苦愚蠢的问题,但为什么不设置必填属性的字段呢? 我需要填写False,将表格绑定到桌子上,并完成它吗?painfully stupid question, but why not just set the Required propertyof the fields that don''t need to be filled in to False, bind the formto the table, and be done with it? 没有意识到有任何愚蠢的问题。因为你似乎知道这么多,怎么用这样的方式向我解释这个我可能理解你的智慧的人。 谢谢 TORQUEDidn''t realize there were any stupid questions.Since you seem to know so much, how about explainin this to me in such a waythat I might understand someone of your inteligence.ThanksTORQUE 并非所有字段都会一直使用,有时则会被使用。 我需要的是那些字段有一些东西需要记录,而那些空白的东西要被忽视。Not all the fields will be used all the time, and other times they will be.What I need is for the fields that have something in them to be recorded, and the onesthat are blank to be overlooked. 这篇关于将多个未绑定字段保存到表时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-05 18:54