T
tigger
Help!
I am trying to open a new form (and a new record) and want to pass the Audit
ID and Actual Date from the Audit Details form to the Audit ID and Date
Raised fields in the NCR Details form.
The Audit ID works beautifully but the date is being displayed as a time.
The formatting of all underlying tables and the control itself is Medium Date
with no input masks.
Can anyone explain the problem?
Thanks, my code is below.
+++++frmAuditDetails:Code+++++
Dim stDocName As String
stDocName = "frmNCRDetails"
'Load the data entry form and autopopulate the Audit ID field
DoCmd.OpenForm stDocName, acNormal, , , acFormAdd, acDialog, _
txtAuditID.Value & ";" & txtActualDate.Value
'Requery the main form when the data has been entered
Forms!frmAuditDetails.subfrmNCRs.Requery
+++++frmNCRDetails:Code+++++
Dim lngAuditID As Long
Dim dteDateRaised as Date
If Not IsNull(Me.OpenArgs) Then
lngAuditID = Left(OpenArgs, InStr(OpenArgs, ";") - 1)
dteDateRaised = Mid(OpenArgs, InStr(OpenArgs, ";") + 1)
Me.txtAuditID.DefaultValue = lngAuditID
Me.txtDateRaised.DefaultValue = dteDateRaised
End If
I am trying to open a new form (and a new record) and want to pass the Audit
ID and Actual Date from the Audit Details form to the Audit ID and Date
Raised fields in the NCR Details form.
The Audit ID works beautifully but the date is being displayed as a time.
The formatting of all underlying tables and the control itself is Medium Date
with no input masks.
Can anyone explain the problem?
Thanks, my code is below.
+++++frmAuditDetails:Code+++++
Dim stDocName As String
stDocName = "frmNCRDetails"
'Load the data entry form and autopopulate the Audit ID field
DoCmd.OpenForm stDocName, acNormal, , , acFormAdd, acDialog, _
txtAuditID.Value & ";" & txtActualDate.Value
'Requery the main form when the data has been entered
Forms!frmAuditDetails.subfrmNCRs.Requery
+++++frmNCRDetails:Code+++++
Dim lngAuditID As Long
Dim dteDateRaised as Date
If Not IsNull(Me.OpenArgs) Then
lngAuditID = Left(OpenArgs, InStr(OpenArgs, ";") - 1)
dteDateRaised = Mid(OpenArgs, InStr(OpenArgs, ";") + 1)
Me.txtAuditID.DefaultValue = lngAuditID
Me.txtDateRaised.DefaultValue = dteDateRaised
End If