N
nxqviet
Hi all,
I need help in changing a record source of a sub form.
I used this code
========================Code====================
Dim varName As Variant
varName = SessionID.Value
Dim stRecordSourceSQL As String
stRecordSourceSQL = "SELECT [" & varName & "].ID, [" & varName
& "].ServiceName, [" & varName & "].Price FROM " & varName & ";"
Forms!frmAsgnPrice_EditPrices!frmAsgnPrice_EditPricesSubForm.Form.RecordSource
= stRecordSourceSQL
========================End=====================
The form containing this sub form is open when this code is executed.
It keep saying that "the Object is closed or Does not exist". How do I
change this?
Thanks,
V_
I need help in changing a record source of a sub form.
I used this code
========================Code====================
Dim varName As Variant
varName = SessionID.Value
Dim stRecordSourceSQL As String
stRecordSourceSQL = "SELECT [" & varName & "].ID, [" & varName
& "].ServiceName, [" & varName & "].Price FROM " & varName & ";"
Forms!frmAsgnPrice_EditPrices!frmAsgnPrice_EditPricesSubForm.Form.RecordSource
= stRecordSourceSQL
========================End=====================
The form containing this sub form is open when this code is executed.
It keep saying that "the Object is closed or Does not exist". How do I
change this?
Thanks,
V_