G
Guest
I'm new to Access, what am I doing wrong passing these variables to the
mainform? I need these pasted or set to the control value in the mainform.
Any help would be appreciated. Thanks
Private Sub Recording_DblClick(Cancel As Integer)
Dim rstInst As Recordset
Dim strRecording As String
Dim strInstDate As String
'Set recordset to Inst table
Set rstInst = dbsCurrent.OpenRecordset("Inst", dbOpenSnapshot)
' Get Recording from subform and set to varible
strRecording = Forms!Ownership![Inst Subform].Form![Recording]
' Get InstDate from subform and set to varible
strInstDate = Forms!Ownership![Inst Subform].Form![InstDate]
Forms!Ownership!Recording.SetFocus
' Set varible to Recording in mainform
Forms!Ownership![Recording] = strRecording 'This Varible has no value
' Set varible to InstDate in mainform
Forms!Ownership![InstDate] = strInstDate 'This Varible has no value
' Cleanup
rstInst.Close
End Sub
mainform? I need these pasted or set to the control value in the mainform.
Any help would be appreciated. Thanks
Private Sub Recording_DblClick(Cancel As Integer)
Dim rstInst As Recordset
Dim strRecording As String
Dim strInstDate As String
'Set recordset to Inst table
Set rstInst = dbsCurrent.OpenRecordset("Inst", dbOpenSnapshot)
' Get Recording from subform and set to varible
strRecording = Forms!Ownership![Inst Subform].Form![Recording]
' Get InstDate from subform and set to varible
strInstDate = Forms!Ownership![Inst Subform].Form![InstDate]
Forms!Ownership!Recording.SetFocus
' Set varible to Recording in mainform
Forms!Ownership![Recording] = strRecording 'This Varible has no value
' Set varible to InstDate in mainform
Forms!Ownership![InstDate] = strInstDate 'This Varible has no value
' Cleanup
rstInst.Close
End Sub