thisisntwally
CE&A
- Local time
- Yesterday, 19:31
- Joined
- Jun 27, 2007
- Messages
- 246
In trying to link between two forms im having some problems (no doubt due to the primary key being an autonumber, in addition to my tpying slliks)
this:
gives me a 'syntax error'
this:
prompts me for a parameter value for keyID
this:
D
says command or action saverecord is unavailable.
when put into this:
this:
Code:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Update"
stLinkCriteria = "![keyID]=" & Me!txtkey
DoCmd.openForm stDocName, , , stLinkCriteria
gives me a 'syntax error'
this:
Code:
DoCmd.openForm "Update", acNormal, , "!keyID='" & Me![txtkey] & "'", acFormEdit, acWindowNormal
prompts me for a parameter value for keyID
this:
D
Code:
im stDocName As String
Dim stLinkCriteria As String
stDocName = "Update"
stLinkCriteria = "[keyID]=" & "'" & Me![txtkey] & "'"
With DoCmd
.RunCommand acCmdSaveRecord
.openForm stDocName, , , stLinkCriteria
End With
Forms![Update]![txtkey].DefaultValue = Me![txtkey]
says command or action saverecord is unavailable.
when put into this:
Code:
Private Sub Command85_Click()
On Error GoTo Err_Command85_Click
With CurrentDb.OpenRecordset("tbl Modifications", dbOpenTable)
.AddNew
!Program = Me.txtProgram '\
!Name = Me.cboName '|
!ObjectClass = Me.cboObjectClass
!ParentProgram = Me.txtParentProgram
!Fund = Me.txtfund
!ReportingEntity = Me.txtReportingEntity
!PurchaseOrder = Me.txtPurchaseOrder
!Comments = Me.txtComments
!AppropriationYear = Me.cboAppropriationYear
!Site = Me.txtsite
!DOR = Me.txtDOR
!FiscalYear = Me.cboFiscalYear '|
!Description = Me.txtdescription '|
!Budget = Me.txtCharge '|
!UpdateDate = Date
!SSD = Me.txtSSD
!CertifiedDocument = Me.objRequest
!BCD = Me.txtBCD
!FCD = Me.txtFCD
!Vendor = Me.txtVendor
!Amendment = Me.txtAmendment
.Update
.Bookmark = .LastModified
End With
Exit_Command85_Click:
Exit Sub
Err_Command85_Click:
MsgBox Err.Description
Resume Exit_Command85_Click
End Sub