我正在使用以下代码向表中添加一条记录:
Dim rs1 As DAO.Recordset
Set rs1 = CurrentDb.OpenRecordset("QUOTE-Run", dbOpenDynaset)
rs1.AddNew
rs1.Fields("[QuoteNumber]").value = [txtQuoteNumber].value
rs1.Fields("[LeadTime]").value = [txtLeadTime].value
rs1.Fields("[Qty]").value = [txtQty].value
rs1.Fields("[Title]").value = [txtTitle].value
rs1.Fields("[Date]").value = VBA.DateTime.Date
rs1.Fields("[Time]").value = VBA.DateTime.Time
rs1.Fields("[InitiatedBy]").value = Application.CurrentUser
rs1.Fields("[IncompleteProblemNotes]").value = [txtIncompleteProblemNotes].value
rs1.Fields("[CustomerNotes]").value = [txtCustomerNotes].value
rs1.Fields("[Memo]").value = [txtMemo].value
rs1.Fields("[Memo1]").value = [txtMemo1].value
rs1.Fields("[PrefferedQuoteRunSelect]").value = [txtPrefferedQuoteRunSelect].value
rs1.Fields("[CombinedRun]").value = [chkCombinedRun].value
rs1.Update
创建记录时,有一个名为 RunID 的自动编号主键字段会获取一个值。我需要知道该值是什么,以便稍后在代码中使用它。获取该价值的最简单方法是什么?